mirror of
https://github.com/ivuorinen/csharp-progressbar.git
synced 2026-01-26 03:34:01 +00:00
98 lines
3.7 KiB
XML
98 lines
3.7 KiB
XML
<Window x:Name="Processing" x:Class="ProgressBar.MainWindow"
|
|
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"
|
|
mc:Ignorable="d"
|
|
Title="Processing..."
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Width="360"
|
|
Height="100"
|
|
ResizeMode="NoResize"
|
|
WindowStartupLocation="CenterScreen" Topmost="True">
|
|
<Viewbox HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<Grid VerticalAlignment="Center" HorizontalAlignment="Center">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="60" Name="RowActions"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="150"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Button
|
|
x:Name="BtnStart"
|
|
Content="Start processing"
|
|
Grid.Column="1"
|
|
Margin="6,20,4,20"
|
|
Click="BtnStart_Click"
|
|
VerticalAlignment="Center"
|
|
/>
|
|
|
|
<Grid Margin="5,5,0,0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="20" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="30"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBox
|
|
x:Name="Amount"
|
|
Grid.Column="0"
|
|
Text="{Binding Countdown, FallbackValue=1, Mode=TwoWay, NotifyOnTargetUpdated=True, NotifyOnSourceUpdated=True, NotifyOnValidationError=True, StringFormat=\{0:D\}, TargetNullValue=1, UpdateSourceTrigger=LostFocus}"
|
|
MaxLength="3"
|
|
TextAlignment="Right"
|
|
BorderBrush="{x:Null}"
|
|
Background="{x:Null}"
|
|
SelectionBrush="{x:Null}"
|
|
IsEnabled="False"
|
|
/>
|
|
<Label
|
|
x:Name="AmountLabel"
|
|
Grid.Column="1"
|
|
Content="seconds to process" Padding="5,0"
|
|
/>
|
|
</Grid>
|
|
<Slider
|
|
x:Name="Slider"
|
|
VerticalAlignment="Bottom"
|
|
Value="{Binding Countdown, FallbackValue=1, Mode=TwoWay, NotifyOnTargetUpdated=True, NotifyOnSourceUpdated=True, NotifyOnValidationError=True, TargetNullValue=1, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}"
|
|
Margin="10,0,0,10"
|
|
ValueChanged="Slider_ValueChanged"
|
|
Minimum="1"
|
|
Maximum="3600"
|
|
SmallChange="1"
|
|
/>
|
|
|
|
<ProgressBar
|
|
x:Name="ProgressBar"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Grid.Row="0"
|
|
Value="0"
|
|
Maximum="100"
|
|
Height="20"
|
|
Margin="10,5"
|
|
Visibility="Hidden"
|
|
/>
|
|
|
|
<Button
|
|
x:Name="ButtonDone"
|
|
Grid.ColumnSpan="2"
|
|
Grid.RowSpan="2"
|
|
AutomationProperties.Name="ButtonDone"
|
|
Content="Done processing. Click to confirm and close."
|
|
Click="ButtonDone_Click"
|
|
Visibility="Hidden"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
Padding="5"
|
|
/>
|
|
|
|
</Grid>
|
|
</Viewbox>
|
|
</Window>
|