feat: try to setup communication.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.LogicalTree;
|
||||
|
||||
namespace Ursa.Controls;
|
||||
|
||||
@@ -14,4 +15,18 @@ public class NavMenu: SelectingItemsControl
|
||||
{
|
||||
return new NavMenuItem();
|
||||
}
|
||||
|
||||
internal void SelectItem(NavMenuItem item)
|
||||
{
|
||||
if (item.IsSelected) return;
|
||||
var children = this.LogicalChildren.OfType<NavMenuItem>();
|
||||
foreach (var child in children)
|
||||
{
|
||||
if (child != item)
|
||||
{
|
||||
child.IsSelected = false;
|
||||
}
|
||||
}
|
||||
item.IsSelected = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user