-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.axaml
More file actions
123 lines (117 loc) · 6.66 KB
/
MainWindow.axaml
File metadata and controls
123 lines (117 loc) · 6.66 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<Window 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:selectSight="clr-namespace:SelectSight"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SelectSight.MainWindow"
Title="SelectSight"
Icon="avares://SelectSight/Assets/icon.ico">
<Grid RowDefinitions="*,Auto" Background="WhiteSmoke">
<Grid x:Name="FilesGrid" Grid.Row="0" ColumnDefinitions="8*,1*">
<Border Grid.Column="0" BorderBrush="LightGray" BorderThickness="0,0,1,0" Background="Transparent">
<Grid RowDefinitions="Auto,*">
<ListBox Grid.Row="1"
x:Name="AllFilesListBox"
Background="Transparent"
AutoScrollToSelectedItem="False"
SelectionMode="Multiple">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.Styles>
<Style Selector="ListBoxItem">
<Setter Property="Padding" Value="0"/>
<Setter Property="Margin" Value="0"/>
</Style>
</ListBox.Styles>
<ListBox.ItemTemplate>
<DataTemplate x:DataType="selectSight:FileItem">
<StackPanel HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Transparent">
<Image Source="{Binding Thumbnail}"
Width="{Binding Source={x:Static selectSight:Program.AppSettings}, Path=ThumbnailSize}"
Height="{Binding Source={x:Static selectSight:Program.AppSettings}, Path=ThumbnailSize}"
Stretch="Uniform"
ClipToBounds="True"
VerticalAlignment="Center"
HorizontalAlignment="Center"/>
<TextBlock Text="{Binding Name}"
Foreground="Black"
TextAlignment="Center"
TextWrapping="NoWrap"
TextTrimming="CharacterEllipsis"
MaxWidth="{Binding Source={x:Static selectSight:Program.AppSettings}, Path=ThumbnailSize}"
ToolTip.Tip="{Binding Name}"
Margin="0,5,0,0"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Border>
<Border Grid.Column="1" Background="Transparent" x:Name="SelectedFilesBorder">
<ListBox x:Name="SelectedFilesListBox" Background="Transparent">
<ListBox.ItemTemplate>
<DataTemplate x:DataType="selectSight:FileItem">
<StackPanel Orientation="Horizontal">
<TextBlock Foreground="Black" Text="{Binding Name}"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
</Grid>
<Border Grid.Row="1" BorderBrush="LightGray" BorderThickness="0,1,0,0"
Background="Transparent" Padding="10">
<Grid ColumnDefinitions="*,*">
<Grid Grid.Column="0" ColumnDefinitions="Auto,*" HorizontalAlignment="Stretch">
<TextBlock Grid.Column="0" x:Name="FilesInfoText" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<TextBlock Grid.Column="1" x:Name="FeedbackText" HorizontalAlignment="Right" VerticalAlignment="Center"/>
</Grid>
<StackPanel Grid.Column="1"
Orientation="Horizontal" HorizontalAlignment="Right">
<Button Content="Select All"
HorizontalContentAlignment="Left"
Background="DeepSkyBlue"
Click="SelectAllBtnClick"
x:Name="SelectAllButton"
Padding="15,8" Margin="0,0,10,0">
<Button.Styles>
<Style Selector="Button:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="LightSkyBlue"/>
</Style>
</Button.Styles>
</Button>
<Button Content="Copy Selected"
Background="YellowGreen"
IsEnabled="False"
Click="CopySelectedBtnClick"
x:Name="CopyButton"
Padding="15,8" Margin="0,0,10,0">
<Button.Styles>
<Style Selector="Button:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="LightGreen"/>
</Style>
</Button.Styles>
</Button>
<Button Content="Clear Selected"
Background="DarkRed"
Click="ClearSelectedBtnClick"
IsEnabled="False"
x:Name="ClearButton"
Padding="15,8">
<Button.Styles>
<Style Selector="Button:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="Firebrick"/>
</Style>
</Button.Styles>
</Button>
</StackPanel>
</Grid>
</Border>
</Grid>
</Window>