forked from Escartem/MeiBrowser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
75 lines (68 loc) · 4.09 KB
/
Copy pathMainWindow.xaml
File metadata and controls
75 lines (68 loc) · 4.09 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
<Window x:Class="GUI.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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:local="clr-namespace:GUI"
mc:Ignorable="d"
Loaded="Window_Loaded"
Background="{DynamicResource WindowBackgroundBrush}"
Title="MainWindow" Height="450" Width="800">
<Grid>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Grid.Row="0" Grid.Column="0" x:Name="DownloadButton" Content="Download selected"
Width="150" Height="30" Margin="0,0,10,10"
HorizontalAlignment="Center"
Click="DownloadButton_Click" />
<Button Grid.Row="0" Grid.Column="1" x:Name="ResetButton" Content="Reset"
Width="150" Height="30" Margin="10,0,0,10"
HorizontalAlignment="Center"
Click="ResetButton_Click" />
<ComboBox Grid.Row="0" Grid.Column="2" x:Name="ThemeSelector"
Width="150" Height="30" Margin="10,0,0,10"
SelectionChanged="Theme_SelectionChanged"
VerticalContentAlignment="Center">
<ComboBoxItem Content="Dark" IsSelected="True"/>
<ComboBoxItem Content="Light"/>
<ComboBoxItem Content="Brown"/>
<ComboBoxItem Content="Custom..."/>
</ComboBox>
</StackPanel>
<TreeView Background="{DynamicResource ControlBackgroundBrush}" Name="FileTree" Grid.Row="1" Grid.ColumnSpan="2" ItemsSource="{Binding RootItems}">
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type local:FileItem}" ItemsSource="{Binding Children}">
<StackPanel Orientation="Horizontal" Margin="2">
<Image Source="{Binding Icon}" Width="16" Height="16" Margin="0,0,5,0"/>
<TextBlock Text="{Binding Name}" Width="400"/>
<TextBlock Text="{Binding Size}" Width="80" HorizontalAlignment="Right"/>
<TextBlock Text="{Binding Type}" Width="100" HorizontalAlignment="Right"/>
<TextBlock Text="{Binding Elements}" Width="100" HorizontalAlignment="Right"/>
</StackPanel>
</HierarchicalDataTemplate>
</TreeView.Resources>
</TreeView>
</Grid>
<Grid x:Name="LoadingOverlay" Background="#80000000" Visibility="Collapsed" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Loading..." Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
<ProgressBar IsIndeterminate="True" Width="200" Height="20"/>
</StackPanel>
</Grid>
<Grid x:Name="DownloadingOverlay" Background="#80000000" Visibility="Collapsed" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Downloading your files..." Foreground="White" FontSize="16" HorizontalAlignment="Center"/>
<ProgressBar x:Name="DownloadBar" Width="200" Height="20"/>
<TextBlock x:Name="DownloadText" Foreground="White" FontSize="14" HorizontalAlignment="Center"/>
</StackPanel>
</Grid>
</Grid>
</Window>