chart tile migrated to tilecontrol
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/Tiles/TileViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/Tiles/TileViewModel.cs
@@ -10,9 +10,6 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles
[AutoNotify] private ObservableCollection<TilePresetViewModel>? _tilePresets;
[AutoNotify] private int _tilePresetIndex;
[AutoNotify] private TileSize _currentTileSize;
- [AutoNotify(SetterModifier = AccessModifier.Private)] private bool _isSmallPreset;
- [AutoNotify(SetterModifier = AccessModifier.Private)] private bool _isNormalPreset;
- [AutoNotify(SetterModifier = AccessModifier.Private)] private bool _isWidePreset;
protected TileViewModel()
@@ -50,10 +47,6 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles
private void UpdatePresetFlags()
{
CurrentTileSize = CurrentTilePreset?.TileSize ?? TileSize.Normal;
-
- IsSmallPreset = CurrentTilePreset?.TileSize == TileSize.Small;
- IsNormalPreset = CurrentTilePreset?.TileSize == TileSize.Normal;
- IsWidePreset = CurrentTilePreset?.TileSize == TileSize.Wide;
}
}
}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/BtcPriceTileView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/BtcPriceTileView.axaml
x:CompileBindings="True" x:DataType="vm:BtcPriceTileViewModel"
x:Class="WalletWasabi.Fluent.Views.Wallets.Home.Tiles.BtcPriceTileView">
<Panel>
- <bp:BtcPriceSmallTileView IsVisible="{Binding IsSmallPreset}"/>
- <bp:BtcPriceNormalTileView IsVisible="{Binding IsNormalPreset}"/>
- <bp:BtcPriceWideTileView IsVisible="{Binding IsWidePreset}"/>
+ <bp:BtcPriceSmallTileView />
+ <bp:BtcPriceNormalTileView />
+ <bp:BtcPriceWideTileView />
</Panel>
</UserControl>

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/RoundStatusTileView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/RoundStatusTileView.axaml
x:CompileBindings="True" x:DataType="vm:RoundStatusTileViewModel"
x:Class="WalletWasabi.Fluent.Views.Wallets.Home.Tiles.RoundStatusTileView">
<Panel>
- <rs:RoundStatusSmallTileView IsVisible="{Binding IsSmallPreset}"/>
- <rs:RoundStatusNormalTileView IsVisible="{Binding IsNormalPreset}"/>
- <rs:RoundStatusWideTileView IsVisible="{Binding IsWidePreset}"/>
+ <rs:RoundStatusSmallTileView />
+ <rs:RoundStatusNormalTileView />
+ <rs:RoundStatusWideTileView />
</Panel>
</UserControl>

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletBalanceChart/WalletBalanceChartNormalTileView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletBalanceChart/WalletBalanceChartNormalTileView.axaml
<UserControl.Styles>
<StyleInclude Source="avares://WalletWasabi.Fluent/Styles/BalanceLineChart.axaml" />
</UserControl.Styles>
- <Border ClipToBounds="False" CornerRadius="5" Background="{DynamicResource TileRegionColor}" Margin="6" Padding="16" BoxShadow="{DynamicResource InfoBoxShadow}">
<DockPanel>
<DockPanel DockPanel.Dock="Top" HorizontalAlignment="Stretch">
<TextBlock Text="Balance over time" DockPanel.Dock="Left" />
<Separator DockPanel.Dock="Top" Margin="-16 15" />
- <c:LineChart x:CompileBindings="True" x:DataType="vm:WalletBalanceChartTileViewModel" x:Name="GradientLineChart" DockPanel.Dock="Bottom" Margin="30 10 15 30"
+ <c:LineChart x:CompileBindings="True" x:DataType="vm:WalletBalanceChartTileViewModel" x:Name="GradientLineChart"
+ DockPanel.Dock="Bottom" Margin="30 10 15 30"
Classes="area border xAxis xAxisLabels yAxis yAxisLabels"
SmoothCurve="True"
XAxisMinimum="{Binding XMinimum}"
</c:LineChart.AreaStroke>
</c:LineChart>
</DockPanel>
- </Border>
</UserControl>
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletBalanceChart/WalletBalanceChartSmallTileView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletBalanceChart/WalletBalanceChartSmallTileView.axaml
<UserControl.Styles>
<StyleInclude Source="avares://WalletWasabi.Fluent/Styles/BalanceLineChart.axaml" />
</UserControl.Styles>
- <Border ClipToBounds="False" CornerRadius="5" Background="{DynamicResource TileRegionColor}" Margin="6" Padding="16" BoxShadow="{DynamicResource InfoBoxShadow}">
<DockPanel>
<DockPanel DockPanel.Dock="Top" HorizontalAlignment="Stretch">
<TextBlock Text="Balance over time" DockPanel.Dock="Left" />
<PathIcon Data="{StaticResource more_regular}" Foreground="{DynamicResource TextForegroundColor}" />
</Button>
</DockPanel>
- <c:LineChart x:CompileBindings="True" x:DataType="vm:WalletBalanceChartTileViewModel" x:Name="GradientLineChart" DockPanel.Dock="Left" Margin="30 15 15 15"
+ <c:LineChart x:CompileBindings="True" x:DataType="vm:WalletBalanceChartTileViewModel" x:Name="GradientLineChart"
+ DockPanel.Dock="Left" Margin="30 15 15 15"
Classes="area border xAxis xAxisLabels yAxis yAxisLabels"
SmoothCurve="True"
XAxisMinimum="{Binding XMinimum}"
</c:LineChart.AreaStroke>
</c:LineChart>
</DockPanel>
- </Border>
</UserControl>
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletBalanceChart/WalletBalanceChartWideTileView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletBalanceChart/WalletBalanceChartWideTileView.axaml
<UserControl.Styles>
<StyleInclude Source="avares://WalletWasabi.Fluent/Styles/BalanceLineChart.axaml" />
</UserControl.Styles>
- <Border ClipToBounds="False" CornerRadius="5" Background="{DynamicResource TileRegionColor}" Margin="6" Padding="16" BoxShadow="{DynamicResource InfoBoxShadow}">
<DockPanel>
<DockPanel DockPanel.Dock="Top" HorizontalAlignment="Stretch">
<TextBlock Text="Balance over time" DockPanel.Dock="Left" />
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
- <RadioButton x:DataType="vm:TimePeriodOptionViewModel" Classes="text" Content="{Binding Text}" Command="{Binding SelectCommand}" IsChecked="{Binding IsSelected}" />
+ <RadioButton x:DataType="vm:TimePeriodOptionViewModel" Classes="text" Content="{Binding Text}"
+ Command="{Binding SelectCommand}" IsChecked="{Binding IsSelected}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Separator DockPanel.Dock="Top" Margin="-16 15" />
- <c:LineChart x:CompileBindings="True" x:DataType="vm:WalletBalanceChartTileViewModel" x:Name="GradientLineChart" DockPanel.Dock="Bottom" Margin="30 5 15 30"
+ <c:LineChart x:CompileBindings="True" x:DataType="vm:WalletBalanceChartTileViewModel" x:Name="GradientLineChart"
+ DockPanel.Dock="Bottom" Margin="30 5 15 30"
Classes="area border xAxis xAxisLabels yAxis yAxisLabels"
SmoothCurve="True"
XAxisMinimum="{Binding XMinimum}"
</c:LineChart.AreaStroke>
</c:LineChart>
</DockPanel>
- </Border>
</UserControl>
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletBalanceChartTileView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletBalanceChartTileView.axaml
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="using:WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles"
xmlns:wbc="clr-namespace:WalletWasabi.Fluent.Views.Wallets.Home.Tiles.WalletBalanceChart"
+ xmlns:controls="clr-namespace:WalletWasabi.Fluent.Controls"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:CompileBindings="True" x:DataType="vm:WalletBalanceChartTileViewModel"
x:Class="WalletWasabi.Fluent.Views.Wallets.Home.Tiles.WalletBalanceChartTileView">
- <Panel>
- <wbc:WalletBalanceChartSmallTileView IsVisible="{Binding IsSmallPreset}"/>
- <wbc:WalletBalanceChartNormalTileView IsVisible="{Binding IsNormalPreset}"/>
- <wbc:WalletBalanceChartWideTileView IsVisible="{Binding IsWidePreset}"/>
- </Panel>
+ <controls:TileControl>
+ <wbc:WalletBalanceChartSmallTileView />
+ <controls:TileControl.LargeSizeContent>
+ <wbc:WalletBalanceChartNormalTileView />
+ </controls:TileControl.LargeSizeContent>
+ <controls:TileControl.WideSizeContent>
+ <wbc:WalletBalanceChartWideTileView />
+ </controls:TileControl.WideSizeContent>
+ </controls:TileControl>
</UserControl>
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletPieChartTileView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletPieChartTileView.axaml
x:CompileBindings="True" x:DataType="vm:WalletPieChartTileViewModel"
x:Class="WalletWasabi.Fluent.Views.Wallets.Home.Tiles.WalletPieChartTileView">
<Panel>
- <wpc:WalletPieChartSmallTileView IsVisible="{Binding IsSmallPreset}"/>
- <wpc:WalletPieChartNormalTileView IsVisible="{Binding IsNormalPreset}"/>
- <wpc:WalletPieChartWideTileView IsVisible="{Binding IsWidePreset}"/>
+ <wpc:WalletPieChartSmallTileView />
+ <wpc:WalletPieChartNormalTileView />
+ <wpc:WalletPieChartWideTileView />
</Panel>
</UserControl>
\ No newline at end of file

chart tile migrated to tilecontrol