-
Notifications
You must be signed in to change notification settings - Fork 385
Expand file tree
/
Copy pathAddToIgnore.axaml
More file actions
63 lines (58 loc) · 2.86 KB
/
AddToIgnore.axaml
File metadata and controls
63 lines (58 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<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"
xmlns:m="using:SourceGit.Models"
xmlns:vm="using:SourceGit.ViewModels"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SourceGit.Views.AddToIgnore"
x:DataType="vm:AddToIgnore">
<StackPanel Orientation="Vertical" Margin="8,0">
<StackPanel Orientation="Horizontal">
<Path Width="16" Height="16"
Data="{StaticResource Icons.GitIgnore}"/>
<TextBlock FontSize="18"
Margin="8,0,0,0"
Classes="bold"
Text="{DynamicResource Text.AddToIgnore}"/>
</StackPanel>
<Grid Margin="0,16,0,0" RowDefinitions="32,32" ColumnDefinitions="120,*">
<TextBlock Grid.Row="0" Grid.Column="0"
HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,8,0"
Text="{DynamicResource Text.AddToIgnore.Pattern}"/>
<TextBox Grid.Row="0" Grid.Column="1"
Height="28"
CornerRadius="3"
Text="{Binding Pattern, Mode=TwoWay}">
<TextBox.InnerLeftContent>
<Path Width="12" Height="12" Margin="6,0,2,0" Data="{StaticResource Icons.Pattern}" Fill="{DynamicResource Brush.FG2}"/>
</TextBox.InnerLeftContent>
</TextBox>
<TextBlock Grid.Row="1" Grid.Column="0"
HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,8,0"
Text="{DynamicResource Text.AddToIgnore.Storage}"/>
<ComboBox Grid.Row="1" Grid.Column="1"
Height="28" Padding="4,0"
VerticalAlignment="Center" HorizontalAlignment="Stretch"
ItemsSource="{Binding Source={x:Static m:GitIgnoreFile.Supported}}"
SelectedItem="{Binding StorageFile, Mode=TwoWay}">
<ComboBox.ItemTemplate>
<DataTemplate DataType="m:GitIgnoreFile">
<Grid ColumnDefinitions="20,*,Auto">
<Path Grid.Column="0"
Width="12" Height="12"
Data="{StaticResource Icons.File}"
Fill="{DynamicResource Brush.FG2}"/>
<TextBlock Grid.Column="1" Text="{Binding File, Mode=OneWay}" VerticalAlignment="Center"/>
<Border Grid.Column="2" Height="16" Background="{Binding Brush}" CornerRadius="8" VerticalAlignment="Center">
<TextBlock Text="{Binding Desc}" Margin="8,0" FontSize="10" Foreground="White"/>
</Border>
</Grid>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</StackPanel>
</UserControl>