Generic.xaml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  5. xmlns:local="clr-namespace:PDF_Office">
  6. <!-- style for customControl -->
  7. <Style TargetType="{x:Type cus:DialogContent}">
  8. <Setter Property="Template">
  9. <Setter.Value>
  10. <ControlTemplate TargetType="{x:Type cus:DialogContent}">
  11. <Border Background="White" CornerRadius="8">
  12. <Grid Background="Transparent">
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="48" />
  15. <RowDefinition Height="*" />
  16. <RowDefinition Height="64" />
  17. </Grid.RowDefinitions>
  18. <Border Background="Transparent" BorderThickness="0,0,0,1">
  19. <Border.BorderBrush>
  20. <SolidColorBrush Opacity="0.2" Color="Gray" />
  21. </Border.BorderBrush>
  22. <TextBlock
  23. Margin="16,0,0,0"
  24. VerticalAlignment="Center"
  25. FontSize="16"
  26. FontWeight="SemiBold"
  27. Text="{TemplateBinding Header}" />
  28. </Border>
  29. <ContentPresenter Grid.Row="1" Content="{TemplateBinding Content}" />
  30. <Border Grid.Row="2" BorderThickness="0,1,0,0">
  31. <Border.BorderBrush>
  32. <SolidColorBrush Opacity="0.2" Color="Gray" />
  33. </Border.BorderBrush>
  34. <ContentControl Content="{TemplateBinding BottmBar}" />
  35. </Border>
  36. </Grid>
  37. </Border>
  38. </ControlTemplate>
  39. </Setter.Value>
  40. </Setter>
  41. </Style>
  42. </ResourceDictionary>