Added volume control. Updated styling.
This commit is contained in:
@@ -167,6 +167,31 @@
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- Volume Slider -->
|
||||
<Grid Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right">
|
||||
<StackPanel Orientation="Horizontal" Spacing="8" VerticalAlignment="Center">
|
||||
<Button Style="{StaticResource FlatButton}" BorderBrush="{StaticResource DarkGradientBrush}" Command="{Binding ToggleMuteCommand}">
|
||||
<Viewbox Width="24" Height="24">
|
||||
<Canvas Width="512" Height="512">
|
||||
<Path Stretch="None" Fill="{Binding VolumeState, Converter={StaticResource VolumeStateToFill}, ConverterParameter={StaticResource DarkGradientBrush}}" Stroke="{StaticResource DarkGradientBrush}" StrokeThickness="32" StrokeLineJoin="Round" StrokeStartLineCap="Round" StrokeEndLineCap="Round" Data="{Binding VolumeState, Converter={StaticResource VolumeStateToIcon}}"></Path>
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</Button>
|
||||
<Slider Width="200" Minimum="0.0" Maximum="1.0" StepFrequency="0.01" VerticalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}">
|
||||
<Slider.Resources>
|
||||
<!-- Thumb (the "ball") -->
|
||||
<StaticResource x:Key="SliderThumbBackground" ResourceKey="DarkGradientBrush"/>
|
||||
<StaticResource x:Key="SliderThumbBackgroundPointerOver" ResourceKey="DarkGradientBrush"/>
|
||||
<StaticResource x:Key="SliderThumbBackgroundPressed" ResourceKey="DarkGradientBrush"/>
|
||||
|
||||
<!-- Filled portion of the track (defaults to system accent on hover/press) -->
|
||||
<StaticResource x:Key="SliderTrackValueFill" ResourceKey="SliderGradientBrush"/>
|
||||
<StaticResource x:Key="SliderTrackValueFillPointerOver" ResourceKey="SliderGradientBrush"/>
|
||||
<StaticResource x:Key="SliderTrackValueFillPressed" ResourceKey="SliderGradientBrush"/>
|
||||
</Slider.Resources>
|
||||
</Slider>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user