zhaw-dnet2/Tasks/UrlTester/MainWindow.xaml

81 lines
3.6 KiB
Text
Raw Normal View History

2024-03-21 22:43:09 +00:00
<Window x:Class="UrlTester.MainWindow"
2024-03-21 22:24:29 +00:00
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"
2024-03-21 22:42:08 +00:00
xmlns:local="clr-namespace:DT3"
2024-03-21 22:24:29 +00:00
mc:Ignorable="d"
2024-03-21 22:42:32 +00:00
Title="MainWindow"
Height="450"
Width="800">
2024-03-21 23:08:20 +00:00
<Window.Resources>
<Style x:Key="CommonStyle" TargetType="FrameworkElement">
<Setter Property="Margin" Value="10" />
</Style>
<Style TargetType="Button" BasedOn="{StaticResource CommonStyle}">
<Setter Property="Padding"
2024-03-21 23:43:26 +00:00
Value="15,0,15,0" />
2024-03-21 23:08:20 +00:00
</Style>
<Style TargetType="TextBox" BasedOn="{StaticResource CommonStyle}" />
2024-03-21 23:43:26 +00:00
<Style TargetType="TextBlock" BasedOn="{StaticResource CommonStyle}" />
<Style TargetType="ProgressBar" BasedOn="{StaticResource CommonStyle}">
<Setter Property="Height"
Value="20" />
</Style>
2024-03-21 23:08:20 +00:00
</Window.Resources>
<Border>
2024-03-21 22:42:32 +00:00
<Grid>
<StackPanel Orientation="Vertical">
2024-03-21 23:08:20 +00:00
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
2024-03-21 23:25:00 +00:00
<Button Content="GetUrl"
2024-03-22 01:23:46 +00:00
IsDefault="true" />
2024-03-21 23:25:00 +00:00
<TextBox Grid.Column="2"
2024-03-22 01:23:46 +00:00
Text="{Binding Url, Mode=OneWayToSource}" />
2024-03-21 23:08:20 +00:00
</Grid>
2024-03-21 22:42:32 +00:00
<StackPanel Orientation="Horizontal">
2024-03-21 23:08:20 +00:00
<StackPanel.Resources>
<Style TargetType="TextBlock" BasedOn="{StaticResource CommonStyle}">
<Setter Property="Background"
Value="LightGray" />
<Setter Property="Width"
Value="150" />
<Setter Property="Padding"
Value="5"/>
</Style>
</StackPanel.Resources>
<TextBlock Text="{Binding Size, StringFormat={}{0} bytes}" />
<TextBlock Text="{Binding Time, StringFormat={}{0} ms}" />
2024-03-21 22:42:32 +00:00
</StackPanel>
2024-03-21 23:43:26 +00:00
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ProgressBar x:Name="timeBar"
Minimum="0"
Maximum="1000"
Value="{Binding Time}"
2024-03-21 23:43:26 +00:00
Grid.ColumnSpan="3" />
<TextBlock Grid.Row="1"
Grid.Column="1"
TextAlignment="Center"
Text="500 ms" />
<TextBlock Grid.Row="1"
Grid.Column="2"
TextAlignment="Right"
Text="1000 ms" />
</Grid>
2024-03-21 22:42:32 +00:00
</StackPanel>
</Grid>
</Border>
2024-03-21 22:24:29 +00:00
</Window>