Reputation: 3076
I am using syncfusion: menuItemAdv control for showing a hierarchical menu items for an applications. OnMouseOver or OnMouseClicked(ExpandMode Property)it shows the sub items on mouse hover a menu items. But It doesn't disappear that list on mouse leave. However, If I click anywhere else on the windows(lost focus probably),then it cleans the sub menu item.
So, Instead of clearing the sub menu items on lost focus. I want to do that on mouse leave as user might open any other application without causing lost focus event and might get confused. So, I want to clear the item list on mouse leave.
I know, I can write a behavior and can hook it's on mouse leave event but I don't know how to clean that list. As there is no method exposed from this library. tempering with item source might screw something.
Any help is appreciated.
xaml is as following
<Window x:Class="WpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp1"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Window.DataContext>
<local:MainWindowVM></local:MainWindowVM>
</Window.DataContext>
<Grid>
<syncfusion:MenuAdv Width="300" Height="40" ItemsSource="{Binding League}" ExpandMode="ExpandOnMouseOver">
<syncfusion:MenuAdv.ItemTemplate >
<HierarchicalDataTemplate DataType="local:MenuList" ItemsSource="{Binding Teams}" >
<StackPanel Orientation="Vertical" VerticalAlignment="Top" >
<Label Content="{Binding Name}" Height="Auto" FontFamily="Arial" FontSize="12" VerticalAlignment="Top" Margin="0,3,0,0" VerticalContentAlignment="Center"/>
</StackPanel>
</HierarchicalDataTemplate>
</syncfusion:MenuAdv.ItemTemplate>
</syncfusion:MenuAdv>
</Grid>
</Window>
Upvotes: 0
Views: 127
Reputation: 295
We have checked the reported behavior and considered this as bug. The fix for this bug will be included in our volume 3 SP2 release which is scheduled to be rolled out by end of September.
Regards, Durga S.
Upvotes: 2