New button style
This commit is contained in:
parent
e76cf3cd2a
commit
31252cea0e
37
App.xaml
37
App.xaml
@ -11,6 +11,43 @@
|
||||
<ResourceDictionary Source="Resources/Resources.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style TargetType="Button" x:Key="ButtonStyle">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
|
||||
<Setter Property="Margin" Value="1" />
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||
|
||||
<Setter Property="Background" Value="{x:Null}" />
|
||||
<Setter Property="BorderBrush" Value="{x:Null}" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{TemplateBinding Border.CornerRadius}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background" Value="{x:Null}" />
|
||||
<Setter Property="BorderBrush" Value="{x:Null}" />
|
||||
<Setter Property="Foreground" Value="#FFABABAB" />
|
||||
</Trigger>
|
||||
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="LightGray" />
|
||||
<Setter Property="BorderBrush" Value="SlateGray" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Border.CornerRadius" Value="2" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="RepeatButtonTransparent" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
|
@ -50,43 +50,43 @@
|
||||
</Grid>
|
||||
<!-- https://docs.microsoft.com/en-us/windows/apps/design/style/segoe-ui-symbol-font -->
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,8,0,0">
|
||||
<Button x:Name="PreviousTrack" Click="Previous_Clicked" Background="{x:Null}" BorderBrush="{x:Null}" HorizontalAlignment="Left" FocusVisualStyle="{x:Null}">
|
||||
<TextBlock FontSize="25" FontFamily="Segoe MDL2 Assets" Text=""/>
|
||||
<Button x:Name="PreviousTrack" Click="Previous_Clicked" Style="{StaticResource ButtonStyle}" HorizontalAlignment="Left">
|
||||
<TextBlock FontSize="25" FontFamily="Segoe MDL2 Assets" Text="" Padding="2" />
|
||||
</Button>
|
||||
<Button x:Name="PauseButton" Click="Pause_Clicked" Background="{x:Null}" BorderBrush="{x:Null}" Margin="10,0,10,0" FocusVisualStyle="{x:Null}">
|
||||
<TextBlock x:Name="PlayPause" FontSize="25" FontFamily="Segoe MDL2 Assets" Text=""/>
|
||||
<Button x:Name="PauseButton" Click="Pause_Clicked" Style="{StaticResource ButtonStyle}" HorizontalAlignment="Center" Margin="10,0,10,0">
|
||||
<TextBlock x:Name="PlayPause" FontSize="25" FontFamily="Segoe MDL2 Assets" Text="" Padding="2"/>
|
||||
</Button>
|
||||
<Button x:Name="NextTrack" Click="Next_Clicked" FontSize="18" Background="{x:Null}" BorderBrush="{x:Null}" HorizontalAlignment="Right" FocusVisualStyle="{x:Null}">
|
||||
<TextBlock FontSize="25" FontFamily="Segoe MDL2 Assets" Text=""/>
|
||||
<Button x:Name="NextTrack" Click="Next_Clicked" Style="{StaticResource ButtonStyle}" HorizontalAlignment="Right">
|
||||
<TextBlock FontSize="25" FontFamily="Segoe MDL2 Assets" Text="" Padding="2"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<Grid VerticalAlignment="Stretch" Margin="0,18,0,0">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="10,2,10,0">
|
||||
<Grid VerticalAlignment="Stretch" Margin="0,14,0,0">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="10,4,10,0">
|
||||
<TextBlock FontFamily="Segoe MDL2 Assets" Text="" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="16"/>
|
||||
<Slider x:Name="VolumeSlider" Maximum="100" Value="50" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" MinWidth="180" FlowDirection="LeftToRight" PreviewMouseUp="VolumeSlider_DragCompleted" FocusVisualStyle="{x:Null}"/>
|
||||
<TextBlock FontFamily="Segoe MDL2 Assets" Text="" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="7.5,0,0,0" FontSize="16"/>
|
||||
</StackPanel>
|
||||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" VerticalAlignment="Bottom" MinHeight="27">
|
||||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" VerticalAlignment="Bottom" MinHeight="30">
|
||||
<Border x:Name="BorderRandom" Style="{StaticResource UnselectedButton}" BorderBrush="Black" HorizontalAlignment="Stretch" VerticalAlignment="Top" SnapsToDevicePixels="True">
|
||||
<Button x:Name="Random" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Background="{x:Null}" BorderBrush="{x:Null}" Click="Random_Clicked" FocusVisualStyle="{x:Null}">
|
||||
<TextBlock FontSize="18" FontFamily="Segoe MDL2 Assets" Text="" Margin="0" Padding="0, 0, 0, 2"/>
|
||||
<Button x:Name="Random" Click="Random_Clicked" Style="{StaticResource ButtonStyle}" VerticalContentAlignment="Center" HorizontalContentAlignment="Center">
|
||||
<TextBlock FontSize="18" FontFamily="Segoe MDL2 Assets" Text="" Margin="0" Padding="3, 3, 3, 3"/>
|
||||
</Button>
|
||||
</Border>
|
||||
<Border x:Name="BorderRepeat" Style="{StaticResource UnselectedButton}" BorderBrush="Black" VerticalAlignment="Top" Margin="10,0,0,0">
|
||||
<Button x:Name="Repeat" Background="{x:Null}" FontSize="18" BorderBrush="{x:Null}" Click="Repeat_Clicked" FocusVisualStyle="{x:Null}">
|
||||
<TextBlock FontSize="18" FontFamily="Segoe MDL2 Assets" Text="" Padding="0, 0, 0, 2"/>
|
||||
<Button x:Name="Repeat" Click="Repeat_Clicked" Style="{StaticResource ButtonStyle}" VerticalContentAlignment="Center" HorizontalContentAlignment="Center">
|
||||
<TextBlock FontSize="18" FontFamily="Segoe MDL2 Assets" Text="" Padding="3, 3, 3, 3"/>
|
||||
</Button>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal" VerticalAlignment="Bottom" MinHeight="27">
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal" VerticalAlignment="Bottom" MinHeight="30">
|
||||
<Border x:Name="BorderSingle" Style="{StaticResource UnselectedButton}" BorderBrush="Black" HorizontalAlignment="Stretch" VerticalAlignment="Top" SnapsToDevicePixels="True" Margin="0,0,10,0">
|
||||
<Button x:Name="Single" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" BorderBrush="{x:Null}" Background="{x:Null}" Click="Single_Clicked" FocusVisualStyle="{x:Null}">
|
||||
<TextBlock FontSize="18" FontFamily="Segoe MDL2 Assets" Text="" Margin="0" Padding="0, 0, 0, 2"/>
|
||||
<Button x:Name="Single" Click="Single_Clicked" Style="{StaticResource ButtonStyle}" VerticalContentAlignment="Center" HorizontalContentAlignment="Center">
|
||||
<TextBlock FontSize="18" FontFamily="Segoe MDL2 Assets" Text="" Margin="0" Padding="3, 3, 3, 3"/>
|
||||
</Button>
|
||||
</Border>
|
||||
<Border x:Name="BorderConsume" Style="{StaticResource UnselectedButton}" BorderBrush="Black" HorizontalAlignment="Stretch" VerticalAlignment="Top" SnapsToDevicePixels="True">
|
||||
<Button x:Name="Consume" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" BorderBrush="{x:Null}" Background="{x:Null}" Click="Consume_Clicked" FocusVisualStyle="{x:Null}">
|
||||
<TextBlock FontSize="18" FontFamily="Segoe MDL2 Assets" Text="" Margin="0" Padding="0, 0, 0, 2"/>
|
||||
<Button x:Name="Consume" Click="Consume_Clicked" Style="{StaticResource ButtonStyle}" VerticalContentAlignment="Center" HorizontalContentAlignment="Center">
|
||||
<TextBlock FontSize="18" FontFamily="Segoe MDL2 Assets" Text="" Margin="0" Padding="3, 3, 3, 3"/>
|
||||
</Button>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
Loading…
Reference in New Issue
Block a user