|
| 1 | +<UserControl xmlns="https://github.com/avaloniaui" |
| 2 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 3 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 4 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 5 | + xmlns:m="using:SourceGit.Models" |
| 6 | + xmlns:vm="using:SourceGit.ViewModels" |
| 7 | + xmlns:v="using:SourceGit.Views" |
| 8 | + xmlns:c="using:SourceGit.Converters" |
| 9 | + mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
| 10 | + x:Class="SourceGit.Views.DeleteMultipleBranches" |
| 11 | + x:DataType="vm:DeleteMultipleBranches"> |
| 12 | + <StackPanel Orientation="Vertical" Margin="8,0"> |
| 13 | + <TextBlock FontSize="18" |
| 14 | + Classes="bold" |
| 15 | + Text="{DynamicResource Text.DeleteMultiBranch}" /> |
| 16 | + |
| 17 | + <Grid Margin="0,16,8,0" RowDefinitions="Auto,Auto" ColumnDefinitions="120,*"> |
| 18 | + <TextBlock Grid.Row="0" Grid.Column="0" |
| 19 | + HorizontalAlignment="Right" VerticalAlignment="Top" |
| 20 | + Text="{DynamicResource Text.DeleteMultiBranch.Targets}" /> |
| 21 | + <Border Grid.Row="0" Grid.Column="1" |
| 22 | + Background="{DynamicResource Brush.Contents}" |
| 23 | + BorderThickness="1" |
| 24 | + BorderBrush="{DynamicResource Brush.Border1}" |
| 25 | + CornerRadius="4" |
| 26 | + Padding="4"> |
| 27 | + <DataGrid MaxHeight="200" |
| 28 | + Background="Transparent" |
| 29 | + BorderThickness="0" |
| 30 | + ItemsSource="{Binding Targets}" |
| 31 | + SelectionMode="Single" |
| 32 | + CanUserReorderColumns="False" |
| 33 | + CanUserResizeColumns="False" |
| 34 | + CanUserSortColumns="False" |
| 35 | + IsReadOnly="True" |
| 36 | + HeadersVisibility="None" |
| 37 | + Focusable="False" |
| 38 | + RowHeight="26" |
| 39 | + HorizontalScrollBarVisibility="Auto" |
| 40 | + VerticalScrollBarVisibility="Auto"> |
| 41 | + <DataGrid.Styles> |
| 42 | + <Style Selector="DataGridRow"> |
| 43 | + <Setter Property="CornerRadius" Value="4" /> |
| 44 | + </Style> |
| 45 | + |
| 46 | + <Style Selector="DataGridRow /template/ Border#RowBorder"> |
| 47 | + <Setter Property="ClipToBounds" Value="True" /> |
| 48 | + </Style> |
| 49 | + |
| 50 | + <Style Selector="DataGridRow:pointerover /template/ Rectangle#BackgroundRectangle"> |
| 51 | + <Setter Property="Fill" Value="{DynamicResource Brush.AccentHovered}" /> |
| 52 | + </Style> |
| 53 | + |
| 54 | + <Style Selector="DataGridRow:selected /template/ Rectangle#BackgroundRectangle"> |
| 55 | + <Setter Property="Fill" Value="{DynamicResource Brush.Accent}" /> |
| 56 | + </Style> |
| 57 | + </DataGrid.Styles> |
| 58 | + |
| 59 | + <DataGrid.Columns> |
| 60 | + <DataGridTemplateColumn Header="ICON"> |
| 61 | + <DataGridTemplateColumn.CellTemplate> |
| 62 | + <DataTemplate> |
| 63 | + <Path Width="10" Height="10" Margin="4,0,8,0" Data="{StaticResource Icons.Branch}" /> |
| 64 | + </DataTemplate> |
| 65 | + </DataGridTemplateColumn.CellTemplate> |
| 66 | + </DataGridTemplateColumn> |
| 67 | + |
| 68 | + <DataGridTemplateColumn Width="*" Header="NAME"> |
| 69 | + <DataGridTemplateColumn.CellTemplate> |
| 70 | + <DataTemplate> |
| 71 | + <TextBlock Text="{Binding Converter={x:Static c:BranchConverters.ToName}}" ClipToBounds="True" |
| 72 | + Classes="monospace" /> |
| 73 | + </DataTemplate> |
| 74 | + </DataGridTemplateColumn.CellTemplate> |
| 75 | + </DataGridTemplateColumn> |
| 76 | + </DataGrid.Columns> |
| 77 | + </DataGrid> |
| 78 | + </Border> |
| 79 | + |
| 80 | + <TextBlock Grid.Row="1" Grid.Column="1" |
| 81 | + Margin="0,8,0,0" |
| 82 | + Text="{DynamicResource Text.DeleteMultiBranch.Tip}" |
| 83 | + TextWrapping="Wrap" |
| 84 | + Foreground="{DynamicResource Brush.FG2}" |
| 85 | + FontStyle="Italic" /> |
| 86 | + </Grid> |
| 87 | + </StackPanel> |
| 88 | +</UserControl> |
0 commit comments