-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBlockWindow.xaml
50 lines (50 loc) · 2.99 KB
/
BlockWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<local:RoundedWindow x:Class="ZipImageViewer.BlockWindow" x:Name="BlockWin"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ZipImageViewer" WindowStartupLocation="CenterOwner" CloseBehavior="FadeOutAndClose"
Background="{StaticResource BackgroundLightBrush}" Foreground="{StaticResource ForegroundBrush}"
mc:Ignorable="d" Height="170" Width="260" ShowInTaskbar="False" Loaded="BlockWin_Loaded" Closing="BlockWin_Closing"
ResizeMode="NoResize" Topmost="True">
<Window.Resources>
<!--<local:CenterParentConverter x:Key="CenterParentConverter"/>-->
</Window.Resources>
<!--<Window.Left>
<MultiBinding Converter="{StaticResource CenterParentConverter}" Mode="OneWayToSource">
<Binding RelativeSource="{RelativeSource Self}" Path="Owner.Left"/>
<Binding RelativeSource="{RelativeSource Self}" Path="Owner.Width"/>
<Binding RelativeSource="{RelativeSource Self}" Path="Width"/>
</MultiBinding>
</Window.Left>
<Window.Top>
<MultiBinding Converter="{StaticResource CenterParentConverter}" Mode="OneWayToSource">
<Binding RelativeSource="{RelativeSource Self}" Path="Owner.Top"/>
<Binding RelativeSource="{RelativeSource Self}" Path="Owner.Height"/>
<Binding RelativeSource="{RelativeSource Self}" Path="Height"/>
</MultiBinding>
</Window.Top>-->
<Grid x:Name="grid" RenderTransformOrigin="0.5,0.5" Margin="0 0 0 15">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock x:Name="T_Title" HorizontalAlignment="Center" VerticalAlignment="Top" FontWeight="Bold"
Text="{Binding MessageTitle, ElementName=BlockWin, Mode=OneWay}"/>
<TextBlock Grid.Row="1" x:Name="TB_Message" HorizontalAlignment="Stretch" TextWrapping="Wrap" FontSize="10" Margin="5 10"
Text="{Binding MessageBody, ElementName=BlockWin, Mode=OneWay}"/>
<ProgressBar Grid.Row="2" x:Name="PB_Message" Height="{Binding FontSize, ElementName=BlockWin, Mode=OneWay}" Margin="5 0"
Value="{Binding Percentage, ElementName=BlockWin, Mode=OneWay}">
<ProgressBar.Style>
<Style TargetType="ProgressBar">
<Style.Triggers>
<DataTrigger Binding="{Binding Percentage, ElementName=BlockWin, Mode=OneWay}" Value="-1">
<Setter Property="IsIndeterminate" Value="True" />
</DataTrigger>
</Style.Triggers>
</Style>
</ProgressBar.Style>
</ProgressBar>
</Grid>
</local:RoundedWindow>