Added source code.
This commit is contained in:
55
Source/GraphingCalculator/Styles/ButtonStyle.xaml
Normal file
55
Source/GraphingCalculator/Styles/ButtonStyle.xaml
Normal file
@ -0,0 +1,55 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Margin" Value="1" />
|
||||
<Setter Property="MinHeight" Value="22" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Name="border" Padding="2" CornerRadius="4"
|
||||
BorderBrush="Gray" BorderThickness="1">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#EEE" Offset="0" />
|
||||
<GradientStop Color="#BBB" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
|
||||
<ContentPresenter HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Border>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="border" Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#FFF" Offset="0" />
|
||||
<GradientStop Color="#C8C8C8" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="border" Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#BBB" Offset="0" />
|
||||
<GradientStop Color="#DDD" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
|
||||
</ControlTemplate.Triggers>
|
||||
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
40
Source/GraphingCalculator/Styles/GroupBoxStyle.xaml
Normal file
40
Source/GraphingCalculator/Styles/GroupBoxStyle.xaml
Normal file
@ -0,0 +1,40 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style TargetType="GroupBox">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="GroupBox">
|
||||
<Border Background="#FAF8F8"
|
||||
BorderBrush="White"
|
||||
BorderThickness="1"
|
||||
CornerRadius="5"
|
||||
Margin="4">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ContentPresenter Margin="3,0,0,0" ContentSource="Header" >
|
||||
<ContentPresenter.Resources>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="Gray" />
|
||||
</Style>
|
||||
</ContentPresenter.Resources>
|
||||
</ContentPresenter>
|
||||
|
||||
<ContentPresenter HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Margin="4" Grid.Row="1" />
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
63
Source/GraphingCalculator/Styles/RadioButtonStyle.xaml
Normal file
63
Source/GraphingCalculator/Styles/RadioButtonStyle.xaml
Normal file
@ -0,0 +1,63 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style TargetType="RadioButton">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="RadioButton">
|
||||
<Grid>
|
||||
<Border Name="border" BorderBrush="Gray" BorderThickness="1">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#EEE" Offset="0" />
|
||||
<GradientStop Color="#BBB" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
<ContentPresenter Margin="4,1,4,1" />
|
||||
</Grid>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Background" Value="White">
|
||||
<Setter TargetName="border" Property="CornerRadius" Value="5,0,0,5" />
|
||||
<Setter TargetName="border" Property="BorderThickness" Value="1,1,0,1" />
|
||||
</Trigger>
|
||||
<Trigger Property="Background" Value="Black">
|
||||
<Setter TargetName="border" Property="CornerRadius" Value="0,5,5,0" />
|
||||
<Setter TargetName="border" Property="BorderThickness" Value="1,1,1,1" />
|
||||
</Trigger>
|
||||
<Trigger Property="Background" Value="Gray">
|
||||
<Setter TargetName="border" Property="CornerRadius" Value="0" />
|
||||
<Setter TargetName="border" Property="BorderThickness" Value="1,1,0,1" />
|
||||
</Trigger>
|
||||
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="border" Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#FFF" Offset="0" />
|
||||
<GradientStop Color="#C8C8C8" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="border" Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#BBB" Offset="0" />
|
||||
<GradientStop Color="#DDD" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
58
Source/GraphingCalculator/Styles/WarningGroupBoxStyle.xaml
Normal file
58
Source/GraphingCalculator/Styles/WarningGroupBoxStyle.xaml
Normal file
@ -0,0 +1,58 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style x:Key="WarningGroupBox" TargetType="{x:Type GroupBox}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type GroupBox}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.RowSpan="2" BorderBrush="Yellow"
|
||||
BorderThickness="1" CornerRadius="5" >
|
||||
<Border.Background>
|
||||
<LinearGradientBrush MappingMode="Absolute"
|
||||
SpreadMethod="Repeat"
|
||||
StartPoint="0,0"
|
||||
EndPoint="5,5">
|
||||
<GradientStop Color="#fde245" Offset=".5" />
|
||||
<GradientStop Color="#caae65" Offset=".5" />
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
|
||||
<Border Grid.RowSpan="2" CornerRadius="5">
|
||||
<Border.Background>
|
||||
<RadialGradientBrush GradientOrigin=".5,0" Center=".5,.1"
|
||||
RadiusX=".9" RadiusY=".8" >
|
||||
<GradientStop Color="#e0FFFFFF" Offset="0" />
|
||||
<GradientStop Color="#10FFFFFF" Offset="1" />
|
||||
</RadialGradientBrush>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
|
||||
<ContentPresenter Margin="7,4,4,0" ContentSource="Header" >
|
||||
<ContentPresenter.Resources>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
<Setter Property="Foreground" Value="#835f01" />
|
||||
</Style>
|
||||
</ContentPresenter.Resources>
|
||||
</ContentPresenter>
|
||||
|
||||
<ContentPresenter HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Margin="5" Grid.Row="1" />
|
||||
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
Reference in New Issue
Block a user