Make common stackpanel props as a style
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletExplorerView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/WalletExplorerView.xaml
<Style.Animations>
<Animation Duration="0:0:2.5" IterationCount="Infinite">
<KeyFrame Cue="100%">
- <Setter Property="RotateTransform.Angle" Value="360" />
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
+ <Style Selector="StackPanel.TreeViewRoot">
+ <Setter Property="Background" Value="Transparent" />
+ <Setter Property="Orientation" Value="Horizontal" />
+ <Setter Property="Spacing" Value="6" />
+ <Setter Property="Height" Value="20" />
+ </Style>
</UserControl.Styles>
<DockPanel LastChildFill="True">
<Panel DockPanel.Dock="Top" HorizontalAlignment="Stretch" Background="{DynamicResource ThemeControlLowBrush}">
</TreeView.Styles>
<TreeView.DataTemplates>
<TreeDataTemplate DataType="ViewModels:ClosedWalletViewModel" ItemsSource="{Binding Actions}">
- <StackPanel Orientation="Horizontal" Spacing="6" Background="Transparent">
+ <StackPanel Classes="TreeViewRoot">
<i:Interaction.Behaviors>
<behaviors:CommandOnDoubleClickBehavior Command="{Binding OpenWalletCommand}" />
</i:Interaction.Behaviors>
</ContextMenu>
</StackPanel.ContextMenu>
<DrawingPresenter Width="16" Height="16" Drawing="{DynamicResource WalletExplorer_ClosedWallet}" />
+ <Panel>
<TextBlock Text="{Binding Title}" Height="19" VerticalAlignment="Center" />
+ </Panel>
<DrawingPresenter Name="PART_Spinner" Width="16" Height="16" IsVisible="{Binding IsBusy}" Drawing="{DynamicResource WalletExplorer_Spinner}" />
</StackPanel>
</TreeDataTemplate>
<TreeDataTemplate DataType="ViewModels:WalletViewModel" ItemsSource="{Binding Actions}">
- <StackPanel Orientation="Horizontal" Spacing="6">
+ <StackPanel Classes="TreeViewRoot">
<DrawingPresenter Width="16" Height="16" Drawing="{DynamicResource WalletExplorer_OpenWallet}" />
+ <Panel>
<TextBlock Text="{Binding Title}" Height="19" VerticalAlignment="Center" />
+ </Panel>
</StackPanel>
</TreeDataTemplate>
<TreeDataTemplate DataType="ViewModels:SendTabViewModel">
- <StackPanel Orientation="Horizontal" Spacing="6">
+ <StackPanel Classes="TreeViewRoot">
<DrawingPresenter Width="16" Height="16" Drawing="{DynamicResource WalletExplorerView_Send}" />
<TextBlock Text="{Binding Title}" VerticalAlignment="Center" />
</StackPanel>
</TreeDataTemplate>
<TreeDataTemplate DataType="ViewModels:BuildTabViewModel">
- <StackPanel Orientation="Horizontal" Spacing="6">
+ <StackPanel Classes="TreeViewRoot">
<DrawingPresenter Width="16" Height="16" Drawing="{DynamicResource WalletExplorerView_Builder}" />
<TextBlock Text="{Binding Title}" VerticalAlignment="Center" />
</StackPanel>
</TreeDataTemplate>
<TreeDataTemplate DataType="ViewModels:ReceiveTabViewModel">
- <StackPanel Orientation="Horizontal" Spacing="6">
+ <StackPanel Classes="TreeViewRoot">
<DrawingPresenter Width="16" Height="16" Drawing="{DynamicResource WalletExplorerView_Receive}" />
<TextBlock Text="{Binding Title}" VerticalAlignment="Center" />
</StackPanel>
</TreeDataTemplate>
<TreeDataTemplate DataType="ViewModels:CoinJoinTabViewModel">
- <StackPanel Orientation="Horizontal" Spacing="6">
+ <StackPanel >
<DrawingPresenter Width="16" Height="16" Drawing="{DynamicResource WalletExplorerView_CoinJoin}" />
<TextBlock Text="{Binding Title}" VerticalAlignment="Center" />
</StackPanel>
</TreeDataTemplate>
<TreeDataTemplate DataType="ViewModels:HistoryTabViewModel">
- <StackPanel Orientation="Horizontal" Spacing="6">
+ <StackPanel Classes="TreeViewRoot">
<DrawingPresenter Width="16" Height="16" Drawing="{DynamicResource WalletExplorerView_History}" />
<TextBlock Text="{Binding Title}" VerticalAlignment="Center" />
</StackPanel>
</TreeDataTemplate>
<TreeDataTemplate DataType="ViewModels:WalletInfoViewModel">
- <StackPanel Orientation="Horizontal" Spacing="6">
+ <StackPanel Classes="TreeViewRoot">
<DrawingPresenter Width="16" Height="16" Drawing="{DynamicResource WalletExplorerView_Info}" />
<TextBlock Text="Wallet Info" VerticalAlignment="Center" />
</StackPanel>
</TreeDataTemplate>
<TreeDataTemplate DataType="ViewModels:WalletAdvancedViewModel" ItemsSource="{Binding Items}">
- <StackPanel Orientation="Horizontal" Spacing="6">
+ <StackPanel Classes="TreeViewRoot">
<DrawingPresenter Width="16" Height="16" Drawing="{DynamicResource WalletExplorerView_Advanced}" />
<TextBlock Text="Advanced" VerticalAlignment="Center" />
</StackPanel>

Make common stackpanel props as a style