MainWindow.xaml 4.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <Window x:Class="MediaBrowser.Uninstaller.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. Title="Uninstall Media Browser" Height="412.686" Width="633.955" WindowStyle="None">
  5. <Grid>
  6. <Image HorizontalAlignment="Center" Height="154" Margin="35,15,35,0" VerticalAlignment="Top" Width="541" Source="/MediaBrowser.Uninstaller;component/Code/Images/mb3logo800.png" Opacity="0.5"/>
  7. <Label x:Name="lblHeading" Content="Uninstall " HorizontalAlignment="Left" Margin="51,169,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.478,-2.753" Height="44" Width="533" FontSize="24"/>
  8. <Button x:Name="btnUninstall" Content="Uninstall" HorizontalAlignment="Left" Margin="505,356,0,0" VerticalAlignment="Top" Width="91" IsDefault="True" RenderTransformOrigin="0.991,-1.041" Click="btnUninstall_Click"/>
  9. <Button x:Name="btnCancel" Content="Cancel" HorizontalAlignment="Left" Margin="412,356,0,0" VerticalAlignment="Top" Width="75" IsCancel="True" Click="btnCancel_Click"/>
  10. <Grid x:Name="grdOptions" HorizontalAlignment="Left" Height="108" Margin="86,231,0,0" VerticalAlignment="Top" Width="353">
  11. <CheckBox x:Name="cbxRemoveAll" Content="Remove All Traces" HorizontalAlignment="Left" Margin="0,3,0,0" VerticalAlignment="Top" Checked="cbxRemoveAll_Checked" Unchecked="cbxRemoveAll_Checked" FontSize="18"/>
  12. <CheckBox x:Name="cbxRemoveCache" Content="Delete Cache Files" HorizontalAlignment="Left" Margin="16,32,0,0" VerticalAlignment="Top" FontSize="18"/>
  13. <CheckBox x:Name="cbxRemoveConfig" Content="Delete Configuration and Log Files" HorizontalAlignment="Left" Margin="16,56,0,0" VerticalAlignment="Top" FontSize="18"/>
  14. <CheckBox x:Name="cbxRemovePlugins" Content="Delete Plug-ins" HorizontalAlignment="Left" Margin="16,82,0,0" VerticalAlignment="Top" FontSize="18"/>
  15. </Grid>
  16. <Button x:Name="btnFinished" Content="Finish" HorizontalAlignment="Left" Margin="505,356,0,0" VerticalAlignment="Top" Width="91" IsDefault="True" RenderTransformOrigin="0.991,-1.041" Click="BtnFinished_OnClick" Visibility="Hidden"/>
  17. </Grid>
  18. <Window.Resources>
  19. <!--Metro Button-->
  20. <Style TargetType="{x:Type Button}" BasedOn="{x:Null}">
  21. <Setter Property="Background" Value="Transparent"/>
  22. <Setter Property="Foreground" Value="#222222"/>
  23. <Setter Property="FontSize" Value="16"/>
  24. <Setter Property="Padding" Value="10,5,10,5"/>
  25. <Setter Property="BorderBrush" Value="#222222"/>
  26. <Setter Property="BorderThickness" Value="2"/>
  27. <Setter Property="Template">
  28. <Setter.Value>
  29. <ControlTemplate TargetType="{x:Type Button}">
  30. <!-- We use Grid as a root because it is easy to add more elements to customize the button -->
  31. <Grid x:Name="Grid">
  32. <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"/>
  33. <!-- Content Presenter is where the text content etc is placed by the control -->
  34. <!-- The bindings are useful so that the control can be parameterized without editing the template -->
  35. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
  36. </Grid>
  37. <!--Each state sets a brush on the Border in the template -->
  38. <ControlTemplate.Triggers>
  39. <Trigger Property="IsPressed" Value="true">
  40. <Setter Property="Background" Value="#222222" TargetName="Border"/>
  41. <Setter Property="BorderBrush" Value="#222222" TargetName="Border"/>
  42. <Setter Property="Foreground" Value="White"/>
  43. <Setter Property="FontSize" Value="16"/>
  44. </Trigger>
  45. <Trigger Property="IsEnabled" Value="true"/>
  46. <Trigger Property="IsEnabled" Value="false">
  47. <Setter Property="BorderBrush" Value="#7f222222" TargetName="Border"/>
  48. <Setter Property="Foreground" Value="#7f222222"/>
  49. </Trigger>
  50. </ControlTemplate.Triggers>
  51. </ControlTemplate>
  52. </Setter.Value>
  53. </Setter>
  54. </Style>
  55. </Window.Resources></Window>