Skip to content

Commit

Permalink
337
Browse files Browse the repository at this point in the history
  • Loading branch information
kikipoulet committed Dec 11, 2024
1 parent c704d09 commit 6ab83c6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions SukiUI/Controls/SukiSideMenu.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ private void MenuExpandedClicked()
{
IsMenuExpanded = !IsMenuExpanded;

UpdateMenuItemsExpansion();
}

private void UpdateMenuItemsExpansion()
{
if(_sideMenuItems.Any())
foreach (var item in _sideMenuItems)
item.IsTopMenuExpanded = IsMenuExpanded;
Expand All @@ -163,12 +168,15 @@ protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
_contentControl = e.NameScope.Get<SukiTransitioningContentControl>("PART_TransitioningContentControl");
_spacer = e.NameScope.Get<Grid>("PART_Spacer");
if(_spacer != null) _spacer.IsVisible = IsSpacerVisible;


}

protected override void OnLoaded(RoutedEventArgs e)
{
base.OnLoaded(e);
SetContentControlContent(SelectedItem);
UpdateMenuItemsExpansion();
}

protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
Expand Down

0 comments on commit 6ab83c6

Please sign in to comment.