Add tile presets for WalletPieChartTileView
MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletPieChart/WalletPieChartNormalTileView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletPieChart/WalletPieChartNormalTileView.axaml
mc:Ignorable="d" d:DesignWidth="330" d:DesignHeight="330"
x:CompileBindings="True" x:DataType="vm:WalletPieChartTileViewModel"
x:Class="WalletWasabi.Fluent.Views.Wallets.Home.Tiles.WalletPieChart.WalletPieChartNormalTileView">
-
+ <Border ClipToBounds="False" CornerRadius="5" Background="{DynamicResource TileRegionColor}" Margin="6" Padding="16"
+ BoxShadow="{DynamicResource InfoBoxShadow}">
+ <DockPanel>
+ <TextBlock Text="Wallet Privacy Status" DockPanel.Dock="Top" />
+ <DockPanel LastChildFill="True" TextBlock.FontSize="12"
+ VerticalAlignment="Stretch">
+ <ItemsRepeater DockPanel.Dock="Bottom" Margin="0,0,0,-8" Items="{Binding TestDataPointsLegend}">
+ <ItemsRepeater.ItemTemplate>
+ <DataTemplate x:DataType="wallets:DataLegend">
+ <DockPanel Margin="0,8">
+ <Ellipse DockPanel.Dock="Left" Margin="0,0,8,0" HorizontalAlignment="Left" Width="10"
+ Height="10"
+ Fill="{Binding HexColor, Converter={x:Static converters:ColorStringConverters.HexColorToBrush}}" />
+ <TextBlock DockPanel.Dock="Left" HorizontalAlignment="Left"
+ Text="{Binding Amount, Converter={x:Static converters:MoneyConverters.MoneyToString}}" />
+ <TextBlock DockPanel.Dock="Right" Margin="8,0,0,0" HorizontalAlignment="Right"
+ Text="{Binding PercentShare, StringFormat=\{0:P1\}}" />
+ <TextBlock DockPanel.Dock="Right" HorizontalAlignment="Right" Text="{Binding Label}" />
+ </DockPanel>
+ </DataTemplate>
+ </ItemsRepeater.ItemTemplate>
+ <ItemsRepeater.Layout>
+ <StackLayout />
+ </ItemsRepeater.Layout>
+ </ItemsRepeater>
+ <Panel Margin="8" VerticalAlignment="Center" HorizontalAlignment="Center">
+ <controls:RingChartControl DataPoints="{Binding TestDataPoints}" />
+ </Panel>
+ </DockPanel>
+ </DockPanel>
+ </Border>
</UserControl>
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletPieChart/WalletPieChartSmallTileView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletPieChart/WalletPieChartSmallTileView.axaml
mc:Ignorable="d" d:DesignWidth="330" d:DesignHeight="150"
x:CompileBindings="True" x:DataType="vm:WalletPieChartTileViewModel"
x:Class="WalletWasabi.Fluent.Views.Wallets.Home.Tiles.WalletPieChart.WalletPieChartSmallTileView">
+ <Border ClipToBounds="False" CornerRadius="5" Background="{DynamicResource TileRegionColor}" Margin="6" Padding="16"
+ BoxShadow="{DynamicResource InfoBoxShadow}">
+ <DockPanel>
+ <TextBlock Text="Wallet Privacy Status" DockPanel.Dock="Top" />
+ <DockPanel LastChildFill="True" TextBlock.FontSize="12"
+ VerticalAlignment="Center">
+ <ItemsRepeater DockPanel.Dock="Bottom" Margin="0,0,0,-8" Items="{Binding TestDataPointsLegend}">
+ <ItemsRepeater.ItemTemplate>
+ <DataTemplate x:DataType="wallets:DataLegend">
+ <DockPanel Margin="0,8">
+ <Ellipse DockPanel.Dock="Left" Margin="0,0,8,0" HorizontalAlignment="Left" Width="10"
+ Height="10"
+ Fill="{Binding HexColor, Converter={x:Static converters:ColorStringConverters.HexColorToBrush}}" />
+ <TextBlock DockPanel.Dock="Left" HorizontalAlignment="Left"
+ Text="{Binding Amount, Converter={x:Static converters:MoneyConverters.MoneyToString}}" />
+ <TextBlock DockPanel.Dock="Right" Margin="8,0,0,0" HorizontalAlignment="Right"
+ Text="{Binding PercentShare, StringFormat=\{0:P1\}}" />
+ <TextBlock DockPanel.Dock="Right" HorizontalAlignment="Right" Text="{Binding Label}" />
+ </DockPanel>
+ </DataTemplate>
+ </ItemsRepeater.ItemTemplate>
+ <ItemsRepeater.Layout>
+ <StackLayout />
+ </ItemsRepeater.Layout>
+ </ItemsRepeater>
+ </DockPanel>
+ </DockPanel>
+ </Border>
</UserControl>
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletPieChartTileView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletPieChartTileView.axaml
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="using:WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles"
- xmlns:controls="clr-namespace:WalletWasabi.Fluent.Controls"
- xmlns:wallets="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles"
- xmlns:converters="clr-namespace:WalletWasabi.Fluent.Converters"
+ xmlns:wpc="clr-namespace:WalletWasabi.Fluent.Views.Wallets.Home.Tiles.WalletPieChart"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:CompileBindings="True" x:DataType="vm:WalletPieChartTileViewModel"
x:Class="WalletWasabi.Fluent.Views.Wallets.Home.Tiles.WalletPieChartTileView">
- <Border ClipToBounds="False" CornerRadius="5" Background="{DynamicResource TileRegionColor}" Margin="6" Padding="16"
- BoxShadow="{DynamicResource InfoBoxShadow}">
- <DockPanel>
- <TextBlock Text="Wallet Privacy Status" DockPanel.Dock="Top" />
- <DockPanel LastChildFill="True" TextBlock.FontSize="12"
- Classes.smallPreset="{Binding IsSmallPreset}"
- Classes.normalPreset="{Binding IsNormalPreset}"
- Classes.widePreset="{Binding IsWidePreset}">
- <DockPanel.Styles>
- <Style Selector="DockPanel.smallPreset">
- <Setter Property="VerticalAlignment" Value="Center"/>
- </Style>
- <Style Selector="DockPanel.normalPreset">
- <Setter Property="VerticalAlignment" Value="Stretch"/>
- </Style>
- <Style Selector="DockPanel.widePreset">
- <Setter Property="VerticalAlignment" Value="Stretch"/>
- </Style>
- </DockPanel.Styles>
- <ItemsRepeater DockPanel.Dock="Bottom" Margin="0,0,0,-8" Items="{Binding TestDataPointsLegend}">
- <ItemsRepeater.ItemTemplate>
- <DataTemplate x:DataType="wallets:DataLegend">
- <DockPanel Margin="0,8">
- <Ellipse DockPanel.Dock="Left" Margin="0,0,8,0" HorizontalAlignment="Left" Width="10"
- Height="10"
- Fill="{Binding HexColor, Converter={x:Static converters:ColorStringConverters.HexColorToBrush}}" />
- <TextBlock DockPanel.Dock="Left" HorizontalAlignment="Left"
- Text="{Binding Amount, Converter={x:Static converters:MoneyConverters.MoneyToString}}" />
- <TextBlock DockPanel.Dock="Right" Margin="8,0,0,0" HorizontalAlignment="Right"
- Text="{Binding PercentShare, StringFormat=\{0:P1\}}" />
- <TextBlock DockPanel.Dock="Right" HorizontalAlignment="Right" Text="{Binding Label}" />
- </DockPanel>
- </DataTemplate>
- </ItemsRepeater.ItemTemplate>
- <ItemsRepeater.Layout>
- <StackLayout />
- </ItemsRepeater.Layout>
- </ItemsRepeater>
-
- <Panel Margin="8" VerticalAlignment="Center" HorizontalAlignment="Center"
- Classes.smallPreset="{Binding IsSmallPreset}"
- Classes.normalPreset="{Binding IsNormalPreset}"
- Classes.widePreset="{Binding IsWidePreset}">
- <Panel.Styles>
- <Style Selector="Panel.smallPreset">
- <Setter Property="IsVisible" Value="False"/>
- </Style>
- <Style Selector="Panel.normalPreset">
- <Setter Property="IsVisible" Value="True"/>
- </Style>
- <Style Selector="Panel.widePreset">
- <Setter Property="IsVisible" Value="True"/>
- </Style>
- </Panel.Styles>
- <controls:RingChartControl DataPoints="{Binding TestDataPoints}" />
+ <Panel>
+ <wpc:WalletPieChartSmallTileView IsVisible="{Binding IsSmallPreset}"/>
+ <wpc:WalletPieChartNormalTileView IsVisible="{Binding IsNormalPreset}"/>
+ <wpc:WalletPieChartWideTileView IsVisible="{Binding IsWidePreset}"/>
</Panel>
- </DockPanel>
- </DockPanel>
- </Border>
-
</UserControl>
\ No newline at end of file

Add tile presets for WalletPieChartTileView