PageRenderTime 41ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/BookReader/BookReader/Resources/XAML/DialogWindow.xaml

#
XAML | 80 lines | 56 code | 15 blank | 9 comment | 0 complexity | c46643f192e60df44d0233543288f667 MD5 | raw file
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:ucd="clr-namespace:BookReader.Dialogs"
  4. xmlns:ucc="clr-namespace:BookReader.Controls"
  5. >
  6. <!-- DialogWindow Style -->
  7. <Style x:Key="DialogWindow" TargetType="{x:Type ucd:DialogWindow}">
  8. <Setter Property="SnapsToDevicePixels" Value="True"/>
  9. <Setter Property="AllowsTransparency" Value="True"/>
  10. <Setter Property="WindowStyle" Value="None"/>
  11. <Setter Property="Background" Value="Transparent"/>
  12. <Setter Property="ShowInTaskbar" Value="False"/>
  13. <Setter Property="Template">
  14. <Setter.Value>
  15. <ControlTemplate TargetType="{x:Type ucd:DialogWindow}">
  16. <Grid Margin="10">
  17. <!--Windows Frame rectangle-->
  18. <Rectangle Style="{DynamicResource RectangleFrame}"/>
  19. <!--PART_Close is the dialog close button-->
  20. <Button Style="{DynamicResource closeButton}" x:Name="PART_Close" Height="11"
  21. HorizontalAlignment="Right" Margin="0,9,11,0" VerticalAlignment="Top" Width="11"
  22. ToolTip="Close" IsCancel="True"/>
  23. <!-- PART_ContentPresenter -->
  24. <ContentPresenter x:Name="PART_ContentPresenter"
  25. HorizontalAlignment="Stretch"
  26. VerticalAlignment="Stretch"
  27. />
  28. </Grid>
  29. </ControlTemplate>
  30. </Setter.Value>
  31. </Setter>
  32. </Style>
  33. <!-- HeaderedDialogWindow Style -->
  34. <Style x:Key="HeaderedDialogWindow" BasedOn="{StaticResource DialogWindow}" TargetType="{x:Type ucd:HeaderedDialogWindow}">
  35. <Setter Property="Template">
  36. <Setter.Value>
  37. <ControlTemplate TargetType="{x:Type ucd:HeaderedDialogWindow}">
  38. <Grid Margin="10">
  39. <Grid.RowDefinitions>
  40. <RowDefinition Height="80" />
  41. <RowDefinition Height="*" />
  42. </Grid.RowDefinitions>
  43. <!--Windows Frame rectangle-->
  44. <Rectangle Grid.RowSpan="2" Style="{DynamicResource RectangleFrame}"/>
  45. <!--Header-->
  46. <ucc:Header Style="{DynamicResource Header}" Grid.Row="0" x:Name="PART_Header"
  47. VerticalAlignment="Top" Height="70"
  48. Title="{TemplateBinding Property=Title}"
  49. Image="{TemplateBinding Property=DialogImage}"
  50. Description="{TemplateBinding Property=DialogDescription}" />
  51. <!--PART_Close is the dialog close button-->
  52. <Button Grid.Row="0" Style="{DynamicResource closeButton}" x:Name="PART_Close" Height="11"
  53. HorizontalAlignment="Right" Margin="0,9,11,0" VerticalAlignment="Top" Width="11"
  54. ToolTip="Close" IsCancel="True"/>
  55. <!-- PART_ContentPresenter -->
  56. <ContentPresenter Grid.Row="1" x:Name="PART_ContentPresenter"
  57. HorizontalAlignment="Stretch"
  58. VerticalAlignment="Stretch"
  59. />
  60. </Grid>
  61. </ControlTemplate>
  62. </Setter.Value>
  63. </Setter>
  64. </Style>
  65. </ResourceDictionary>