Hi,
I can't manage to get a context menu to work into a RadCombox which is filled with a list of checkboxes.
When the user presses the open button then the list is shown. Now I need a contextmenu whereby the user can select or deselect all the checkboxes.
The checkboxes etc. are working well but for some reason the contextmenu is not shown?
Maybe some can give me hint?
My XAML code:
I can't manage to get a context menu to work into a RadCombox which is filled with a list of checkboxes.
When the user presses the open button then the list is shown. Now I need a contextmenu whereby the user can select or deselect all the checkboxes.
The checkboxes etc. are working well but for some reason the contextmenu is not shown?
Maybe some can give me hint?
My XAML code:
<telerikInput:RadComboBox |
x:Name="DayRedScheme_DayTypeId" Grid.Row="0" |
Grid.Column="1" Width="250" Height="25" Margin="0" HorizontalAlignment="Left" |
ClearSelectionButtonContent="None" Text="Selection" ClearSelectionButtonVisibility="Collapsed"> |
<telerikInput:RadComboBox.SelectionBoxTemplate> |
<DataTemplate> |
<TextBlock Grid.Row="1" Grid.Column="1" FontStyle="Oblique" Text="Selection"></TextBlock> |
</DataTemplate> |
</telerikInput:RadComboBox.SelectionBoxTemplate> |
<telerikInput:RadComboBox.ItemTemplate> |
<DataTemplate x:Name="DayTypeComboBoxTemplate"> |
<Grid Margin="0" Width="250"> |
<Grid.ColumnDefinitions> |
<ColumnDefinition Width="25"/> |
<ColumnDefinition Width="150" /> |
<ColumnDefinition Width="75" /> |
</Grid.ColumnDefinitions> |
<Grid.RowDefinitions> |
<RowDefinition /> |
</Grid.RowDefinitions> |
<CheckBox Grid.Column="0" Name="CheckBoxDayType" IsChecked="{Binding IsChecked, Mode=TwoWay}"/> |
<TextBlock Grid.Column="1" Text="{Binding Description}" HorizontalAlignment="Left" VerticalAlignment="Bottom"> |
<telerikNavigation:RadContextMenu.ContextMenu> |
<telerikNavigation:RadContextMenu x:Name="ContextMenu" ItemClick="ContextMenuClick" Opened="ContextMenuOpened"> |
<telerikNavigation:RadMenuItem Header="Select all" /> |
<telerikNavigation:RadMenuItem Header="Clear all" /> |
</telerikNavigation:RadContextMenu> |
</telerikNavigation:RadContextMenu.ContextMenu> |
</TextBlock> |
<Rectangle Grid.Column="2" RadiusX="3" RadiusY="3" Height="15" Width="25" Stretch="Fill" Fill="{Binding Color}" HorizontalAlignment="Left" VerticalAlignment="Center"></Rectangle> |
</Grid> |
</DataTemplate> |
</telerikInput:RadComboBox.ItemTemplate> |
</telerikInput:RadComboBox> |