2024-02-05 23:08:37 -08:00
|
|
|
<UserControl xmlns="https://github.com/avaloniaui"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2024-07-27 06:35:57 -07:00
|
|
|
xmlns:m="using:SourceGit.Models"
|
2024-02-05 23:08:37 -08:00
|
|
|
xmlns:vm="using:SourceGit.ViewModels"
|
|
|
|
xmlns:c="using:SourceGit.Converters"
|
|
|
|
mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="450"
|
|
|
|
x:Class="SourceGit.Views.Discard"
|
|
|
|
x:DataType="vm:Discard">
|
|
|
|
<StackPanel Orientation="Vertical" Margin="8,0,0,0">
|
|
|
|
<TextBlock FontSize="18"
|
2024-04-02 01:23:47 -07:00
|
|
|
Classes="bold"
|
|
|
|
Text="{DynamicResource Text.Discard}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-07-26 00:02:23 -07:00
|
|
|
<Grid Margin="0,16,0,8" RowDefinitions="32,32" ColumnDefinitions="120,*">
|
2024-02-05 23:08:37 -08:00
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0" Margin="0,0,8,0" HorizontalAlignment="Right" Text="{DynamicResource Text.Discard.Changes}"/>
|
2024-07-27 06:35:57 -07:00
|
|
|
<ContentControl Grid.Row="0" Grid.Column="1" Content="{Binding Mode}">
|
2024-07-26 00:02:23 -07:00
|
|
|
<ContentControl.DataTemplates>
|
2024-07-27 06:35:57 -07:00
|
|
|
<DataTemplate DataType="m:Null">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Path Width="12" Height="12" Margin="0,2,0,0" Data="{StaticResource Icons.Folder.Open}"/>
|
|
|
|
<TextBlock Text="{DynamicResource Text.Discard.All}" Margin="4,0,0,0"/>
|
|
|
|
</StackPanel>
|
|
|
|
</DataTemplate>
|
|
|
|
|
2024-07-26 00:02:23 -07:00
|
|
|
<DataTemplate DataType="x:String">
|
2024-02-05 23:08:37 -08:00
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Path Width="12" Height="12" Data="{StaticResource Icons.File}"/>
|
2024-07-26 00:02:23 -07:00
|
|
|
<TextBlock Text="{Binding}" Margin="4,0,0,0"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</StackPanel>
|
|
|
|
</DataTemplate>
|
|
|
|
|
2024-07-26 00:02:23 -07:00
|
|
|
<DataTemplate DataType="x:Int32">
|
2024-02-05 23:08:37 -08:00
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Path Width="12" Height="12" Data="{StaticResource Icons.File}"/>
|
2024-07-27 06:35:57 -07:00
|
|
|
<TextBlock Text="{Binding Converter={x:Static c:StringConverters.FormatByResourceKey}, ConverterParameter='Discard.Total'}" Margin="4,0,0,0"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</StackPanel>
|
|
|
|
</DataTemplate>
|
|
|
|
</ContentControl.DataTemplates>
|
|
|
|
</ContentControl>
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Text="{DynamicResource Text.Discard.Warning}" Foreground="{DynamicResource Brush.FG2}"/>
|
|
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
|
|
</UserControl>
|