1
0
mirror of https://github.com/chylex/Backup-Essentials.git synced 2025-06-02 15:34:06 +02:00

Added TextBox style and page background to App resources

This commit is contained in:
chylex 2015-04-04 21:50:39 +02:00
parent cb2d15bc71
commit fa6599ef26

View File

@ -1,10 +1,11 @@
<Application <Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" x:Class="BackupEssentials.App" xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
Startup="StartApp" x:Class="BackupEssentials.App"
DispatcherUnhandledException="HandleException"> Startup="StartApp"
DispatcherUnhandledException="HandleException">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
@ -13,6 +14,7 @@
<sys:Double x:Key="PageWidth">796</sys:Double> <sys:Double x:Key="PageWidth">796</sys:Double>
<sys:Double x:Key="PageHeight">482</sys:Double> <sys:Double x:Key="PageHeight">482</sys:Double>
<SolidColorBrush x:Key="PageBackground">#FF2E2E2E</SolidColorBrush>
<ControlTemplate x:Key="ButtonStyleDefault" TargetType="{x:Type ButtonBase}"> <ControlTemplate x:Key="ButtonStyleDefault" TargetType="{x:Type ButtonBase}">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
@ -98,8 +100,8 @@
<GradientStop Color="#FF3E3E3E" Offset="1"/> <GradientStop Color="#FF3E3E3E" Offset="1"/>
</LinearGradientBrush> </LinearGradientBrush>
</Border.Background> </Border.Background>
<Label x:Name="label" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" TextOptions.TextRenderingMode="ClearType"> <Label x:Name="label" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{TemplateBinding FontSize}" TextOptions.TextRenderingMode="ClearType">
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0" RecognizesAccessKey="True" SnapsToDevicePixels="True"/>
</Label> </Label>
</Border> </Border>
</Grid> </Grid>
@ -131,6 +133,46 @@
</DiscreteObjectKeyFrame> </DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames> </ObjectAnimationUsingKeyFrames>
</Storyboard> </Storyboard>
<LinearGradientBrush x:Key="TextBoxBorder" EndPoint="0,20" MappingMode="Absolute" StartPoint="0,0">
<GradientStop Color="#ABADB3" Offset="0.05"/>
<GradientStop Color="#E2E3EA" Offset="0.07"/>
<GradientStop Color="#E3E9EF" Offset="1"/>
</LinearGradientBrush>
<Style x:Key="TextBoxStyleDefault" BasedOn="{x:Null}" TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="#FFC5C5C5"/>
<Setter Property="Background" Value="{x:Null}"/>
<Setter Property="BorderBrush" Value="{x:Null}"/>
<Setter Property="CaretBrush" Value="#FFEEEEEE"/>
<Setter Property="BorderThickness" Value="2"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="2"/>
<Setter Property="AllowDrop" Value="true"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Themes:ListBoxChrome x:Name="Bd" BorderThickness="{TemplateBinding BorderThickness}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderFocused="{TemplateBinding IsKeyboardFocusWithin}" SnapsToDevicePixels="true" Background="#FF383838">
<Themes:ListBoxChrome.BorderBrush>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF292929" Offset="0"/>
<GradientStop Color="#FF212121" Offset="1"/>
</LinearGradientBrush>
</Themes:ListBoxChrome.BorderBrush>
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Themes:ListBoxChrome>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="#FF959595"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>
</Application> </Application>