mirror of
https://github.com/chylex/Backup-Essentials.git
synced 2024-10-17 08:42:44 +02:00
100 lines
7.1 KiB
XML
100 lines
7.1 KiB
XML
<Page x:Class="BackupEssentials.Pages.Backup"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:system="clr-namespace:BackupEssentials.Sys"
|
|
xmlns:backup="clr-namespace:BackupEssentials.Backup"
|
|
mc:Ignorable="d"
|
|
d:DesignWidth="{StaticResource PageWidth}" d:DesignHeight="{StaticResource PageHeight}" Background="{StaticResource PageBackground}"
|
|
Title="Backup Locations">
|
|
|
|
<Page.Resources>
|
|
<sys:Double x:Key="LocationListItemHeight">46</sys:Double>
|
|
</Page.Resources>
|
|
|
|
<Grid Margin="0,0,0,3">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="48"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="18"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel Orientation="Horizontal" DataContext="{Binding Source={x:Static system:Settings.Default}}">
|
|
<StackPanel.Resources>
|
|
<Style TargetType="Button">
|
|
<Setter Property="Margin" Value="8,8,0,0"/>
|
|
<Setter Property="FontSize" Value="16"/>
|
|
<Setter Property="Template" Value="{StaticResource ButtonStyleDefault}"/>
|
|
</Style>
|
|
</StackPanel.Resources>
|
|
<Button x:Name="ButtonLocationAdd" Content="{Binding Language[Backup.Button.Add]}" Click="LocationAdd"/>
|
|
<Button x:Name="ButtonLocationEdit" Content="{Binding Language[Backup.Button.Edit]}" Click="LocationEdit" IsEnabled="False"/>
|
|
<Button x:Name="ButtonLocationRemove" Content="{Binding Language[Backup.Button.Remove]}" Click="LocationRemove" IsEnabled="False" Template="{StaticResource ButtonStyleRedDefault}"/>
|
|
</StackPanel>
|
|
|
|
<ListView Name="LocationsListView" Grid.Row="1" Margin="8,8,8,0" MouseMove="ListMouseMove" PreviewMouseLeftButtonUp="ListStopDragging" Style="{StaticResource ListViewStyleDefault}" SelectionChanged="ListViewSelectionChanged">
|
|
<ListView.Resources>
|
|
<Style TargetType="{x:Type ListViewItem}">
|
|
<Setter Property="Padding" Value="8,4,8,8"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ListViewItem}">
|
|
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal"/>
|
|
<VisualState x:Name="MouseOver" Storyboard="{StaticResource ListViewItemStoryboardMouseOver}"/>
|
|
<VisualState x:Name="Selected" Storyboard="{StaticResource ListViewItemStoryboardSelected}"/>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<Grid Width="740" Height="{StaticResource LocationListItemHeight}" Background="#00000000" SnapsToDevicePixels="True" HorizontalAlignment="Left" PreviewMouseLeftButtonDown="ListItemClick">
|
|
<TextBlock Foreground="#FFDDDDDD" Text="{Binding Name}" VerticalAlignment="Top" FontSize="20"/>
|
|
<DockPanel>
|
|
<TextBlock Name="Directory" Foreground="#FFCCCCCC" Text="{Binding Directory}" Margin="0,0,4,0" VerticalAlignment="Bottom" FontSize="16"/>
|
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="22" Height="19" SnapsToDevicePixels="True" Visibility="{Binding LayoutDirectoryCautionVisibility}" ToolTip="{Binding LayoutDirectoryCautionTooltip}">
|
|
<ed:RegularPolygon InnerRadius="1" PointCount="3" StrokeMiterLimit="1" StrokeLineJoin="Round" Fill="#FFD6D6D6" Stroke="#FF1D1D1D" StrokeThickness="2"/>
|
|
<Rectangle Height="6" StrokeThickness="0" VerticalAlignment="Top" Width="2" HorizontalAlignment="Center" RadiusY="0.5" RadiusX="0.5" Margin="0,7,0,0">
|
|
<Rectangle.Fill>
|
|
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
|
<GradientStop Color="#FF6A0000" Offset="1"/>
|
|
<GradientStop Color="#FF9B0000"/>
|
|
</LinearGradientBrush>
|
|
</Rectangle.Fill>
|
|
</Rectangle>
|
|
<Rectangle Fill="#FF680000" Height="2" StrokeThickness="0" VerticalAlignment="Bottom" Width="2" HorizontalAlignment="Center" Margin="0,0,0,3" RadiusX="0.5" RadiusY="0.5"/>
|
|
</Grid>
|
|
</DockPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<ControlTemplate.Triggers>
|
|
<Trigger SourceName="Directory" Property="Text" Value="{x:Static sys:String.Empty}">
|
|
<Setter TargetName="Directory" Property="Margin" Value="0"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ListView.Resources>
|
|
|
|
<ListView.Items>
|
|
<backup:BackupLocation Name="Test1" Directory="C:\Abc"/>
|
|
<backup:BackupLocation Name="Test2" Directory="C:\Abc"/>
|
|
<backup:BackupLocation Name="Test3" Directory="C:\Abc"/>
|
|
<backup:BackupLocation Name="Test4" Directory="C:\Abc"/>
|
|
<backup:BackupLocation Name="Test5" Directory="C:\Abc"/>
|
|
<backup:BackupLocation Name="Test6" Directory="C:\Abc"/>
|
|
<backup:BackupLocation Name="Test7" Directory="C:\Abc"/>
|
|
<backup:BackupLocation Name="Test8" Directory="C:\Abc"/>
|
|
</ListView.Items>
|
|
</ListView>
|
|
|
|
<TextBlock Text="{Binding Language[Backup.Hint], Source={x:Static system:Settings.Default}}" HorizontalAlignment="Left" Grid.Row="2" VerticalAlignment="Center" Foreground="#FFB9B9B9" Margin="12,0,0,0"/>
|
|
</Grid>
|
|
</Page>
|