This is a migrated thread and some comments may be shown as answers.

Why the properties of a CustomAppointment class can't display in tooltip ?

1 Answer 43 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Carlos
Top achievements
Rank 1
Carlos asked on 08 Mar 2013, 02:34 AM
public class CustomAppointment : Appointment
    {
        public string Domain { get; set; }
public string Status { get; set; }
    }


<DataTemplate x:Key="CustomAppoinementToolTipTemplate">
            <Grid MaxWidth="300">
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <TextBlock Text="{Binding Subject}" Grid.Row="0" TextWrapping="Wrap" Margin="5 8 4 3" FontWeight="Bold" />
                <StackPanel Orientation="Horizontal" Margin="5 8 4 3" Grid.Row="1">
                    <TextBlock Text="Domain: " FontSize="10" />
                    <TextBlock Text="{Binding Domain}" FontSize="10" />
                    <TextBlock Text="Status: " FontSize="10" />
                    <TextBlock Text="{Binding Status}" FontSize="10" FontWeight="Bold"/>
                </StackPanel>
            </Grid>
        </DataTemplate>

The "Subject" can display in the tooltip .
"Domain" and "Status" can't display in the tooltip finally.
Why?

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 12 Mar 2013, 01:55 PM
Hello Carlos,

Please change the bindings like this:

<DataTemplate x:Key="CustomAppoinementToolTipTemplate">
    <Grid MaxWidth="300">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBlock Text="{Binding Subject}" Grid.Row="0" TextWrapping="Wrap" Margin="5 8 4 3" FontWeight="Bold" />
        <StackPanel Orientation="Horizontal" Margin="5 8 4 3" Grid.Row="1">
            <TextBlock Text="Domain: " FontSize="10" />
            <TextBlock Text="{Binding Appointment.Domain}" FontSize="10" />
            <TextBlock Text="Status: " FontSize="10" />
            <TextBlock Text="{Binding Appointment.Status}" FontSize="10" FontWeight="Bold"/>
        </StackPanel>
    </Grid>
</DataTemplate>


Kind regards,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ScheduleView
Asked by
Carlos
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or