тут 4 и 5 лаба
This commit is contained in:
parent
58146ac23a
commit
e59a00648f
@ -9,19 +9,55 @@
|
||||
|
||||
<Window.Resources>
|
||||
|
||||
<SolidColorBrush x:Key="BorderColor" Color="#7F00FF"/>
|
||||
<SolidColorBrush x:Key="BorderButtonColor" Color="#7F00FF"/>
|
||||
|
||||
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border BorderBrush="{StaticResource BorderColor}" BorderThickness="2" CornerRadius="5">
|
||||
<Border BorderBrush="{StaticResource BorderButtonColor}" BorderThickness="2" CornerRadius="5">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
<Style.Triggers>
|
||||
|
||||
<!-- Animates the button's opacity on mouse over. -->
|
||||
<EventTrigger RoutedEvent="Button.MouseEnter">
|
||||
<EventTrigger.Actions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation
|
||||
Storyboard.TargetProperty="(Button.Opacity)"
|
||||
From="1.0" To="0.5" Duration="0:0:0.5" AutoReverse="True"
|
||||
RepeatBehavior="Forever" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger.Actions>
|
||||
</EventTrigger>
|
||||
|
||||
<EventTrigger RoutedEvent="Button.MouseLeave">
|
||||
<EventTrigger.Actions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation
|
||||
Storyboard.TargetProperty="(Button.Opacity)"
|
||||
To="1" Duration="0:0:0.1" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger.Actions>
|
||||
</EventTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Storyboard x:Key="PulseAnimation">
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="1" To="0.5" Duration="0:0:0.5" AutoReverse="True" RepeatBehavior="Forever"/>
|
||||
<ColorAnimation Storyboard.TargetProperty="Background.Color" From="#FF0000" To="#00FF00" Duration="0:0:1" AutoReverse="True" RepeatBehavior="Forever"/>
|
||||
</Storyboard>
|
||||
|
||||
</Window.Resources>
|
||||
|
||||
<Grid Background="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}">
|
||||
@ -52,6 +88,7 @@
|
||||
|
||||
<Border Grid.Column="2" Grid.Row="1">
|
||||
<StackPanel >
|
||||
|
||||
<Label Margin="0,4" Content="Самые популярные песни" HorizontalAlignment ="Center"></Label>
|
||||
<Button x:Name ="btnSong1" Content="Flashinglights" HorizontalAlignment="Stretch" Padding="4" Margin="10,0,10,0" Grid.Row="1" VerticalAlignment="Top" Click="btnSong1_Click"/>
|
||||
<Button x:Name ="btnSong2" Content="Niggas in Paris" HorizontalAlignment="Stretch" Padding="4" Margin="10,5,10,0" Click="btnSong2_Click"/>
|
||||
@ -64,7 +101,7 @@
|
||||
|
||||
<Border Grid.Column="0" Grid.Row = "2">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button x:Name ="btnPlay" Content="----- Play -----" Margin="15,29,15,29" Click="btnPlay_Click" />
|
||||
<Button x:Name ="btnPlay" Content="----- Play -----" Margin="15,29,15,29" Click="btnPlay_Click" Background="Black"/>
|
||||
<Button x:Name ="btnPause" Content="---- Pause ----" Margin="0,29,0,29" Click="btnPause_Click"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
Loading…
Reference in New Issue
Block a user