BorderPage.xaml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. x:Class="ControlCatalog.Pages.BorderPage">
  4. <StackPanel Orientation="Vertical" Spacing="4">
  5. <TextBlock Classes="h1">Border</TextBlock>
  6. <TextBlock Classes="h2">A control which decorates a child with a border and background</TextBlock>
  7. <StackPanel Orientation="Vertical"
  8. Margin="0,16,0,0"
  9. HorizontalAlignment="Center"
  10. Spacing="16">
  11. <Border BorderBrush="{DynamicResource SystemAccentColor}" BorderThickness="2" Padding="16">
  12. <TextBlock>Border</TextBlock>
  13. </Border>
  14. <Border Background="{DynamicResource SystemAccentColorDark1}"
  15. BorderBrush="{DynamicResource SystemAccentColor}"
  16. BorderThickness="4"
  17. Padding="16">
  18. <TextBlock>Border and Background</TextBlock>
  19. </Border>
  20. <Border BorderBrush="{DynamicResource SystemAccentColor}"
  21. BorderThickness="4"
  22. CornerRadius="8"
  23. Padding="16">
  24. <TextBlock>Rounded Corners</TextBlock>
  25. </Border>
  26. <Border Background="{DynamicResource SystemAccentColor}"
  27. CornerRadius="8"
  28. Padding="16">
  29. <TextBlock>Rounded Corners</TextBlock>
  30. </Border>
  31. <Border Width="100" Height="100"
  32. BorderThickness="0"
  33. Background="White"
  34. CornerRadius="100" ClipToBounds="True">
  35. <Image Source="/Assets/maple-leaf-888807_640.jpg" Stretch="UniformToFill" />
  36. </Border>
  37. <TextBlock Text="Border with Clipping" HorizontalAlignment="Center" />
  38. </StackPanel>
  39. </StackPanel>
  40. </UserControl>