BililiveRecorder/BililiveRecorder.WPF/UpdateBarUserControl.xaml
Genteure e54b037576 ~
2018-03-21 20:56:56 +08:00

42 lines
2.6 KiB
XML

<UserControl x:Class="BililiveRecorder.WPF.UpdateBarUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BililiveRecorder.WPF"
mc:Ignorable="d"
d:DesignHeight="30" d:DesignWidth="800">
<UserControl.Resources>
<ResourceDictionary>
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
</ResourceDictionary>
</UserControl.Resources>
<Grid Height="30"
Visibility="{Binding Display,Converter={StaticResource BoolToVis}}"
Background="Orange">
<Grid>
<StackPanel Orientation="Horizontal" Height="20" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock VerticalAlignment="Center" Text="{Binding MainText}"/>
<Button Margin="5,0" Click="Button_Click">
<TextBlock Margin="5,0" Text="{Binding ButtonText}"/>
</Button>
</StackPanel>
<Viewbox HorizontalAlignment="Right"
VerticalAlignment="Center"
Height="20" Width="20"
Margin="0,0,10,0">
<Border Background="Transparent" MouseUp="CloseUpdateBar">
<Canvas Width="52" Height="52">
<Path Fill="Black" Data="M26,0C11.664,0,0,11.663,0,26s11.664,26,26,26s26-11.663,26-26S40.336,0,26,0z M26,50C12.767,50,2,39.233,2,26 S12.767,2,26,2s24,10.767,24,24S39.233,50,26,50z"/>
<Path Fill="Black" Data="M35.707,16.293c-0.391-0.391-1.023-0.391-1.414,0L26,24.586l-8.293-8.293c-0.391-0.391-1.023-0.391-1.414,0 s-0.391,1.023,0,1.414L24.586,26l-8.293,8.293c-0.391,0.391-0.391,1.023,0,1.414C16.488,35.902,16.744,36,17,36 s0.512-0.098,0.707-0.293L26,27.414l8.293,8.293C34.488,35.902,34.744,36,35,36s0.512-0.098,0.707-0.293 c0.391-0.391,0.391-1.023,0-1.414L27.414,26l8.293-8.293C36.098,17.316,36.098,16.684,35.707,16.293z"/>
</Canvas>
</Border>
</Viewbox>
</Grid>
<Grid Visibility="{Binding ShowProgressBar,Converter={StaticResource BoolToVis}}">
<ProgressBar Margin="10,5" Value="{Binding Progress}"/>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding ProgressText}"/>
</Grid>
</Grid>
</UserControl>