math-suite/Source/GraphingCalculator/Styles/WarningGroupBoxStyle.xaml

58 lines
2.7 KiB
XML

<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>