sync toggle button
MODIFY
WalletWasabi.Fluent/Behaviors/SplitViewAutoBehavior.cs
WalletWasabi.Fluent/Behaviors/SplitViewAutoBehavior.cs
@@ -17,7 +17,7 @@ namespace WalletWasabi.Fluent.Behaviors
AvaloniaProperty.Register<SplitViewAutoBehavior, double>(nameof(CollapseThreshold));
public static readonly StyledProperty<bool> IsExpandedProperty =
- AvaloniaProperty.Register<SplitViewAutoBehavior, bool>(nameof(IsExpanded));
+ AvaloniaProperty.Register<SplitViewAutoBehavior, bool>(nameof(IsExpanded), true);
public double CollapseThreshold
{
@@ -28,10 +28,7 @@ namespace WalletWasabi.Fluent.Behaviors
public bool IsExpanded
{
get => GetValue(IsExpandedProperty);
- set
- {
- SetValue(IsExpandedProperty, value);
- }
+ set => SetValue(IsExpandedProperty, value);
}
protected override void OnAttached()
@@ -62,9 +59,9 @@ namespace WalletWasabi.Fluent.Behaviors
{
AssociatedObject.DisplayMode = SplitViewDisplayMode.CompactOverlay;
- if (AssociatedObject.IsPaneOpen & !IsExpanded)
+ if (IsExpanded)
{
- AssociatedObject.IsPaneOpen = false;
+ IsExpanded = false;
}
}
else

MODIFY
WalletWasabi.Fluent/ViewModels/NavBarViewModel.cs
WalletWasabi.Fluent/ViewModels/NavBarViewModel.cs
@@ -18,7 +18,7 @@ namespace WalletWasabi.Fluent.ViewModels
private NavBarItemViewModel _selectedItem;
private Dictionary<Wallet, WalletViewModelBase> _walletDictionary;
private bool _anyWalletStarted;
- private bool _isExpanded;
+ private bool _isExpanded = true;
public NavBarViewModel(WalletManager walletManager, UiConfig uiConfig)

MODIFY
WalletWasabi.Fluent/Views/NavBar.axaml
WalletWasabi.Fluent/Views/NavBar.axaml
<DockPanel Margin="1">
<StackPanel DockPanel.Dock="Top" Margin="0 0 0 0">
<StackPanel Orientation="Horizontal" Spacing="5">
- <ToggleButton Classes="NavButton" IsChecked="{Binding IsExpanded}">
+ <ToggleButton Classes="NavButton" IsChecked="{Binding IsExpanded, Mode=TwoWay}">
<PathIcon Data="{StaticResource navigation_regular}" />
</ToggleButton>
<TextBlock Text="Wasabi Wallet" FontWeight="Bold" Foreground="White" VerticalAlignment="Center"/>

sync toggle button