NativeEmbedPage.xaml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:local="using:ControlCatalog.Pages"
  6. d:DesignHeight="800"
  7. d:DesignWidth="400"
  8. x:Class="ControlCatalog.Pages.NativeEmbedPage">
  9. <DockPanel>
  10. <Menu DockPanel.Dock="Top">
  11. <MenuItem Header="Test">
  12. <MenuItem Header="SubMenu">
  13. <MenuItem Header="Item 1"/>
  14. <MenuItem Header="Item 2"/>
  15. <MenuItem Header="Item 3"/>
  16. </MenuItem>
  17. <MenuItem Header="Item 1"/>
  18. <MenuItem Header="Item 2"/>
  19. <MenuItem Header="Item 3"/>
  20. </MenuItem>
  21. </Menu>
  22. <DockPanel DockPanel.Dock="Top">
  23. <Button DockPanel.Dock="Right" Click="ShowPopupDelay">Show popup (delay)</Button>
  24. <Button DockPanel.Dock="Right" Click="ShowPopup">Show popup</Button>
  25. <Border DockPanel.Dock="Right" Background="#c0c0c0">
  26. <ToolTip.Tip>
  27. <ToolTip>
  28. <TextBlock>Text</TextBlock>
  29. </ToolTip>
  30. </ToolTip.Tip>
  31. <TextBlock VerticalAlignment="Center">Tooltip</TextBlock>
  32. </Border>
  33. <TextBox Text="Lorem ipsum dolor sit amet"/>
  34. </DockPanel>
  35. <Grid ColumnDefinitions="*,5,*"
  36. RowDefinitions="*,5,*">
  37. <Grid.Styles>
  38. <Style Selector="DockPanel#FirstPanel:not(.mobile), DockPanel#SecondPanel:not(.mobile)">
  39. <Setter Property="Grid.RowSpan" Value="3" />
  40. </Style>
  41. <Style Selector="DockPanel#SecondPanel:not(.mobile)">
  42. <Setter Property="Grid.Column" Value="2" />
  43. </Style>
  44. <Style Selector="DockPanel#FirstPanel.mobile, DockPanel#SecondPanel.mobile">
  45. <Setter Property="Grid.ColumnSpan" Value="3" />
  46. </Style>
  47. <Style Selector="DockPanel#SecondPanel.mobile">
  48. <Setter Property="Grid.Row" Value="2" />
  49. </Style>
  50. </Grid.Styles>
  51. <DockPanel x:Name="FirstPanel">
  52. <CheckBox x:Name="firstVisible" DockPanel.Dock="Top"
  53. IsChecked="True" Content="Visible" />
  54. <local:EmbedSample IsVisible="{Binding #firstVisible.IsChecked}"/>
  55. </DockPanel>
  56. <GridSplitter Grid.Row="0" Grid.RowSpan="3" Grid.Column="1" Width="5" HorizontalAlignment="Stretch" />
  57. <GridSplitter Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Height="5" VerticalAlignment="Stretch" />
  58. <DockPanel x:Name="SecondPanel">
  59. <CheckBox x:Name="secondVisible" DockPanel.Dock="Top"
  60. IsChecked="True" Content="Visible" />
  61. <local:EmbedSample IsSecond="True" IsVisible="{Binding #secondVisible.IsChecked}"/>
  62. </DockPanel>
  63. </Grid>
  64. </DockPanel>
  65. </UserControl>