8,735
社区成员
发帖
与我相关
我的任务
分享
<Style x:Key="ChildWinStyle" TargetType="{x:Type Window}">
<Setter Property="OverridesDefaultStyle" Value="True"></Setter>
<Setter Property="ResizeMode" Value="CanResizeWithGrip"></Setter>
<Setter Property="SnapsToDevicePixels" Value="true"/>
<Setter Property="FontFamily" Value="Arial"></Setter>
<Setter Property="Window.BorderBrush" Value="#FF4C95BA"></Setter>
<Setter Property="Window.BorderThickness" Value="0"></Setter>
<Setter Property="Template" Value="{StaticResource WindowControlTemplate}"></Setter>
<!--Set Label and GroupBox foreground color-->
<Style.Resources>
<Style TargetType="{x:Type Label}" >
<Setter Property="Foreground" Value="{DynamicResource FontForeground}"></Setter>
<Setter Property="VerticalContentAlignment" Value="Center"></Setter>
</Style>
<Style x:Key="lbBaseStyle" TargetType="{x:Type Label}">
<Setter Property="Height" Value="22"></Setter>
</Style>
<Style x:Key="tabControlStyle">
<Style.Resources>
<Style TargetType="{x:Type Label}" >
<Setter Property="Foreground" Value="#000000"></Setter>
<Setter Property="VerticalContentAlignment" Value="Center"></Setter>
</Style>
</Style.Resources>
</Style>
</Style.Resources>
</Style>
<ControlTemplate x:Key="WindowControlTemplate" TargetType="{x:Type Window}" >
<Border x:Name="WinControlTpl_Border" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" BorderBrush="#FF4C95BA" BorderThickness="1" Background="White" CornerRadius="4" Padding="1">
<Border.RenderTransform>
<TransformGroup>
<ScaleTransform CenterX="400" CenterY="300" />
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Border.RenderTransform>
<Grid Background="{StaticResource WindowBackground}">
<AdornerDecorator>
<ContentPresenter/>
</AdornerDecorator>
<ResizeGrip x:Name="WindowResizeGrip" HorizontalAlignment="Right" VerticalAlignment="Bottom" />
</Grid>
</Border>
<ControlTemplate.Resources>
<Storyboard x:Key="OnLoaded1">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="WinControlTpl_Border" Storyboard.TargetProperty="(UIElement.Opacity)">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="WinControlTpl_Border" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.1500000" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="WinControlTpl_Border" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.1500000" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<ControlTemplate.Triggers>
<Trigger Property="ResizeMode" Value="CanResizeWithGrip">
<Setter TargetName="WindowResizeGrip" Property="Visibility" Value="Visible"/>
</Trigger>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard Storyboard="{StaticResource OnLoaded1}"/>
</EventTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>