I have this user control view.
<UserControl x:Class="TelerikWpfApp1.Views.MainMenuUserControlPanelBarStyle"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:TelerikWpfApp1.Views"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable="d"
d:DesignHeight="500" d:DesignWidth="250">
<UserControl.DataContext>
<Binding Mode="OneWay" Path="MainMenuUserContentPanelBarStyle" Source="{StaticResource Locator}"/>
</UserControl.DataContext>
<UserControl.Resources>
<HierarchicalDataTemplate x:Key="Entity" ItemsSource="{Binding Randuri}">
<StackPanel Orientation="Horizontal">
<Label x:Name="btn" Content="{Binding Titlu}"
Margin="0,0,0,0"
/>
</StackPanel>
</HierarchicalDataTemplate>
</UserControl.Resources>
<Grid>
<!--ItemDoubleClick ="{Binding PanelBarItemDoubleClick}"-->
<telerik:RadPanelBar x:Name="radPanelBar"
Margin="0,0"
ExpandMode="Multiple"
ItemsSource="{Binding UserMeniu}"
ItemTemplate="{StaticResource Entity}"
SelectedItem="{Binding PanelBarSelectedItem, Mode=TwoWay}"
>
</telerik:RadPanelBar>
</Grid>
</UserControl>
And the code for ItemDoubleClick ...:
private void PanelBarItemDoubleClick(object sender, Telerik.Windows.RadRoutedEventArgs e) {
MessageBox.Show("It's working...");
}
When I run the project I get the error message "Unable to cast object of type 'System.Reflection.RuntimeEventInfo' to type 'System.Reflection.MethodInfo'."
What can I do ?
Thanks.