Исправил нажатие кнопки.
This commit is contained in:
parent
ca42b880f1
commit
74f1fda7c7
@ -8,7 +8,6 @@
|
|||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="Button">
|
<ControlTemplate TargetType="Button">
|
||||||
<Grid>
|
<Grid>
|
||||||
<!-- Тень кнопки -->
|
|
||||||
<Border Background="{TemplateBinding Background}"
|
<Border Background="{TemplateBinding Background}"
|
||||||
CornerRadius="15"
|
CornerRadius="15"
|
||||||
BorderBrush="Transparent"
|
BorderBrush="Transparent"
|
||||||
@ -19,7 +18,11 @@
|
|||||||
</Border.Effect>
|
</Border.Effect>
|
||||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
</Border>
|
</Border>
|
||||||
|
<Grid.RenderTransform>
|
||||||
|
<ScaleTransform x:Name="scaleTransform" ScaleX="1" ScaleY="1" />
|
||||||
|
</Grid.RenderTransform>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<!-- Анимация цвета при наведении -->
|
<!-- Анимация цвета при наведении -->
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
@ -43,8 +46,9 @@
|
|||||||
</Trigger.ExitActions>
|
</Trigger.ExitActions>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
|
|
||||||
<!-- Анимация сжатия при нажатии -->
|
<!-- Плавная анимация сжатия и тени при нажатии -->
|
||||||
<Trigger Property="IsPressed" Value="True">
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
|
||||||
<Setter Property="RenderTransform" TargetName="ButtonBorder">
|
<Setter Property="RenderTransform" TargetName="ButtonBorder">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ScaleTransform ScaleX="0.95" ScaleY="0.95" />
|
<ScaleTransform ScaleX="0.95" ScaleY="0.95" />
|
||||||
@ -55,6 +59,30 @@
|
|||||||
<DropShadowEffect Color="Black" BlurRadius="15" ShadowDepth="0" Opacity="0.6" />
|
<DropShadowEffect Color="Black" BlurRadius="15" ShadowDepth="0" Opacity="0.6" />
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetName="scaleTransform"
|
||||||
|
Storyboard.TargetProperty="ScaleX"
|
||||||
|
To="1.0" Duration="0:0:0.1" />
|
||||||
|
<DoubleAnimation Storyboard.TargetName="scaleTransform"
|
||||||
|
Storyboard.TargetProperty="ScaleY"
|
||||||
|
To="1.0" Duration="0:0:0.1" />
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetName="scaleTransform"
|
||||||
|
Storyboard.TargetProperty="ScaleX"
|
||||||
|
To="0.95" Duration="0:0:0.2" />
|
||||||
|
<DoubleAnimation Storyboard.TargetName="scaleTransform"
|
||||||
|
Storyboard.TargetProperty="ScaleY"
|
||||||
|
To="0.95" Duration="0:0:0.2" />
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</Trigger.ExitActions>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
@ -62,6 +90,7 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
|
||||||
<!-- Стиль для закругленного TextBox -->
|
<!-- Стиль для закругленного TextBox -->
|
||||||
<Style x:Key="RoundedTextBoxStyle" TargetType="TextBox">
|
<Style x:Key="RoundedTextBoxStyle" TargetType="TextBox">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
<Window x:Class="EmployeeManagmentView.MainWindow"
|
<Window x:Class="EmployeeManagmentView.MainWindow"
|
||||||
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"
|
||||||
Title="Отдел кадров УлГТУ" Height="450" Width="800" Background="#0D2D4F">
|
Title="Отдел кадров УлГТУ" Height="450" Width="800" Background="#0D2D4F"
|
||||||
|
MinWidth="400" MinHeight="300"
|
||||||
|
MaxWidth="{Binding Source={x:Static SystemParameters.PrimaryScreenWidth}}"
|
||||||
|
MaxHeight="{Binding Source={x:Static SystemParameters.PrimaryScreenHeight}}">
|
||||||
|
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
|
Loading…
Reference in New Issue
Block a user