ProgressForm.xaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <wpf:ThemableWindow x:Class="InABox.WPF.ProgressForm"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:wpf="clr-namespace:InABox.Wpf"
  7. mc:Ignorable="d"
  8. Title="ProgressForm"
  9. WindowStartupLocation="CenterScreen"
  10. WindowStyle="None"
  11. BorderThickness="0"
  12. BorderBrush="Transparent"
  13. AllowsTransparency="True"
  14. Background="Transparent"
  15. MouseDown="Window_MouseDown"
  16. Width="350" Height="200"
  17. x:Name="Window">
  18. <Window.Resources>
  19. <Style TargetType="Button" x:Key="RoundButton">
  20. <Style.Resources>
  21. <Style TargetType="Border">
  22. <Setter Property="CornerRadius" Value="10"/>
  23. </Style>
  24. </Style.Resources>
  25. </Style>
  26. </Window.Resources>
  27. <Border CornerRadius="10" BorderBrush="Gray" BorderThickness="0.75" Padding="5,5,5,0" Background="White">
  28. <Grid Margin="5">
  29. <Grid.RowDefinitions>
  30. <RowDefinition Height="*" />
  31. <RowDefinition Height="Auto" />
  32. <RowDefinition Height="Auto" />
  33. </Grid.RowDefinitions>
  34. <Grid.ColumnDefinitions>
  35. <ColumnDefinition Width="*"/>
  36. <ColumnDefinition Width="Auto"/>
  37. <ColumnDefinition Width="*"/>
  38. </Grid.ColumnDefinitions>
  39. <Image Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3"
  40. x:Name="Splash" Margin="20,10,20,10" Stretch="Uniform" Source="../Resources/splash.png" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
  41. <Label
  42. Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3"
  43. FontSize="14"
  44. FontStyle="Oblique"
  45. x:Name="Progress"
  46. Content="Please wait.."
  47. Margin="0"
  48. HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
  49. HorizontalContentAlignment="Center"
  50. VerticalContentAlignment="Center"
  51. Background="Transparent" />
  52. <Button x:Name="CancelButton" Style="{StaticResource RoundButton}"
  53. Background="LightYellow"
  54. Content="{Binding ElementName=Window,Path=CancelText}"
  55. Visibility="{Binding ElementName=Window,Path=CancelButtonVisibility}"
  56. Padding="5" Margin="5"
  57. Grid.Row="2" Grid.Column="1"
  58. Click="CancelButton_Click"/>
  59. </Grid>
  60. </Border>
  61. </wpf:ThemableWindow>