ScrollPage.xaml 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. <ResourceDictionary xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:controls="using:ControlCatalog">
  4. <ControlTheme x:Key="ScrollPage" TargetType="ContentPage">
  5. <Setter Property="Template">
  6. <ControlTemplate>
  7. <DockPanel>
  8. <ContentPresenter Name="PART_TopCommandBar"
  9. DockPanel.Dock="Top"
  10. HorizontalContentAlignment="Stretch"
  11. IsVisible="False" />
  12. <ContentPresenter Name="PART_BottomCommandBar"
  13. DockPanel.Dock="Bottom"
  14. HorizontalContentAlignment="Stretch"
  15. IsVisible="False" />
  16. <ScrollViewer Margin="20,20,5,0"
  17. HorizontalScrollBarVisibility="Disabled">
  18. <ContentPresenter Name="PART_ContentPresenter"
  19. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  20. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  21. Background="{TemplateBinding Background}"
  22. BorderBrush="{TemplateBinding BorderBrush}"
  23. BorderThickness="{TemplateBinding BorderThickness}"
  24. Content="{TemplateBinding Content}"
  25. ContentTemplate="{TemplateBinding ContentTemplate}"
  26. CornerRadius="{TemplateBinding CornerRadius}" />
  27. </ScrollViewer>
  28. </DockPanel>
  29. </ControlTemplate>
  30. </Setter>
  31. </ControlTheme>
  32. </ResourceDictionary>