This question is locked. New answers and comments are not allowed.
Hi guys,
I have a customized schedule view with a context menu that shows different menu options depending on where the user clicks (appointments, empty slots, resources).
I have no problem getting the first two using the GetClickedElement<T> method. But ResourceItem doesn't derive from FrameworkElement so I can't use its type on the method.
I am using a CustomResourceTemplate:
I tried passing the TextBlock type and I could test the Tag field, but the method always returns null.
Any ideas?
Cheers
I have a customized schedule view with a context menu that shows different menu options depending on where the user clicks (appointments, empty slots, resources).
I have no problem getting the first two using the GetClickedElement<T> method. But ResourceItem doesn't derive from FrameworkElement so I can't use its type on the method.
I am using a CustomResourceTemplate:
<local:CustomGroupHeaderContentTemplateSelector.CustomResourceTemplate> <DataTemplate> <Border Height="40" Width="180" Margin="1 1 1 0" > <StackPanel Margin="1" Orientation="Vertical" HorizontalAlignment="Stretch"> <TextBlock FontFamily="Calibri" FontSize="8" FontStyle="Italic" TextAlignment="Center" Margin="1" Text="{Binding Name.DisplayName}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Tag="ResourceItem" /> </StackPanel> </Border> </DataTemplate></local:CustomGroupHeaderContentTemplateSelector.CustomResourceTemplate>I tried passing the TextBlock type and I could test the Tag field, but the method always returns null.
Any ideas?
Cheers