Hi,
I'm having some display issues with menu items inside a RadContextMenu, which is assigned as the drop down content of a RadDropDownButton.
The menu items are displayed using a DataTemplate set as the ItemTemplate of the RadContextMenu, but this generates a weird inner border effect around each of the RadMenuItems, as if they were contained in an outer RadMenuItem or something similar.
If I just use a TextBlock inside the DataTemplate then the inner border effect goes away, but I lose the ability to associate a command and a command parameter.
Can you recommend a way of fixing this so that the behaviour is the same, but the inner border disappears?
Here's the XAML and C# code that illustrates the problem:
<UserControl
x:Name="myControl"
x:Class="RadComboBoxProblem.MainPage"
<Grid x:Name="LayoutRoot" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<telerik:RadDropDownButton x:Name="NewInstrumentDropDownButton">
<telerik:RadDropDownButton.Content>
<TextBlock Text="New Object" Margin="2,0,0,0" />
</telerik:RadDropDownButton.Content>
<telerik:RadDropDownButton.DropDownContent>
<telerik:RadContextMenu ItemsSource="{Binding AvailableObjectTypes}" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="ItemClick">
<ei:ChangePropertyAction
TargetName="NewInstrumentDropDownButton"
PropertyName="IsOpen"
Value="false" />
</i:EventTrigger>
</i:Interaction.Triggers>
<telerik:RadContextMenu.ItemTemplate>
<DataTemplate>
<telerik:RadMenuItem
Header="{Binding}"
Command="{Binding ElementName=myControl, Path=ViewModel.AddCommand}"
CommandParameter="{Binding}" />
</DataTemplate>
</telerik:RadContextMenu.ItemTemplate>
</telerik:RadContextMenu>
</telerik:RadDropDownButton.DropDownContent>
</telerik:RadDropDownButton>
</Grid>
</UserControl>
Thanks!