MainWindow.xaml 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <Window
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:Code="clr-namespace:MediaBrowser.Installer.Code" x:Class="MediaBrowser.Installer.MainWindow"
  5. Title="Install Media Browser Server" Height="383.481" Width="663.057" ResizeMode="NoResize" WindowStyle="None">
  6. <Border BorderBrush="DarkGray" BorderThickness="2" Margin="0,0,0,0">
  7. <Grid Margin="-2,0,0,0">
  8. <Image x:Name="imgLogo" HorizontalAlignment="Center" Height="172" Margin="10,10,57,0" VerticalAlignment="Top" Width="590" Source="Code/Images/mb3logo800.png" Opacity="0.5"/>
  9. <Grid HorizontalAlignment="Left" Height="153" Margin="0,173,0,0" VerticalAlignment="Top" Width="662" Background="Gray">
  10. <TextBlock x:Name="lblStatus" HorizontalAlignment="Left" Margin="12,14,0,18" Width="637" FontSize="36" Foreground="#FFE6D7D7" Text="Status" TextWrapping="WrapWithOverflow"/>
  11. <Rectangle Fill="#FF49494B" HorizontalAlignment="Left" Height="13" Stroke="Black" VerticalAlignment="Bottom" Width="662"/>
  12. <Rectangle x:Name="rectProgress" Fill="#FF0A0ABF" HorizontalAlignment="Left" Height="13" Stroke="Black" VerticalAlignment="Bottom" Width="0"/>
  13. </Grid>
  14. <Button x:Name="btnCancel" Content="Cancel" HorizontalAlignment="Left" Margin="552,336,0,0" Width="97" FontSize="14" Click="btnCancel_Click" Height="31" VerticalAlignment="Top"/>
  15. </Grid>
  16. </Border>
  17. <Window.Resources>
  18. <!--Metro Button-->
  19. <Style TargetType="{x:Type Button}" BasedOn="{x:Null}">
  20. <Setter Property="Background" Value="Transparent"/>
  21. <Setter Property="Foreground" Value="#222222"/>
  22. <Setter Property="FontSize" Value="16"/>
  23. <Setter Property="Padding" Value="10,5,10,5"/>
  24. <Setter Property="BorderBrush" Value="#222222"/>
  25. <Setter Property="BorderThickness" Value="2"/>
  26. <Setter Property="Template">
  27. <Setter.Value>
  28. <ControlTemplate TargetType="{x:Type Button}">
  29. <!-- We use Grid as a root because it is easy to add more elements to customize the button -->
  30. <Grid x:Name="Grid">
  31. <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"/>
  32. <!-- Content Presenter is where the text content etc is placed by the control -->
  33. <!-- The bindings are useful so that the control can be parameterized without editing the template -->
  34. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
  35. </Grid>
  36. <!--Each state sets a brush on the Border in the template -->
  37. <ControlTemplate.Triggers>
  38. <Trigger Property="IsPressed" Value="true">
  39. <Setter Property="Background" Value="#222222" TargetName="Border"/>
  40. <Setter Property="BorderBrush" Value="#222222" TargetName="Border"/>
  41. <Setter Property="Foreground" Value="White"/>
  42. <Setter Property="FontSize" Value="16"/>
  43. </Trigger>
  44. <Trigger Property="IsEnabled" Value="true"/>
  45. <Trigger Property="IsEnabled" Value="false">
  46. <Setter Property="BorderBrush" Value="#7f222222" TargetName="Border"/>
  47. <Setter Property="Foreground" Value="#7f222222"/>
  48. </Trigger>
  49. </ControlTemplate.Triggers>
  50. </ControlTemplate>
  51. </Setter.Value>
  52. </Setter>
  53. </Style>
  54. </Window.Resources>
  55. </Window>