ShowWindowTest.axaml 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <Window xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:integrationTestApp="clr-namespace:IntegrationTestApp"
  4. x:Class="IntegrationTestApp.ShowWindowTest"
  5. Name="SecondaryWindow"
  6. x:DataType="Window"
  7. Title="Show Window Test">
  8. <Grid>
  9. <Grid Name="TitleAreaControl" IsVisible="False"
  10. Background="LightBlue" VerticalAlignment="Top" ZIndex="100"
  11. Margin="0,0,0,0">
  12. <TextBlock Text="Title Area Control (Tabs)"
  13. HorizontalAlignment="Center" VerticalAlignment="Center"
  14. Foreground="DarkBlue" FontWeight="Bold" />
  15. </Grid>
  16. <integrationTestApp:MeasureBorder Name="MyBorder" Background="{DynamicResource SystemRegionBrush}">
  17. <Grid ColumnDefinitions="Auto,Auto,50,Auto,Auto" RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
  18. <Label Grid.Column="0" Grid.Row="1">Client Size</Label>
  19. <TextBox Name="CurrentClientSize" Grid.Column="1" Grid.Row="1" IsReadOnly="True"
  20. Text="{Binding ClientSize, Mode=OneWay}" />
  21. <Label Grid.Column="0" Grid.Row="2">Frame Size</Label>
  22. <TextBox Name="CurrentFrameSize" Grid.Column="1" Grid.Row="2" IsReadOnly="True"
  23. Text="{Binding FrameSize, Mode=OneWay}" />
  24. <Label Grid.Column="0" Grid.Row="3">Position</Label>
  25. <TextBox Name="CurrentPosition" Grid.Column="1" Grid.Row="3" IsReadOnly="True" />
  26. <Label Grid.Column="0" Grid.Row="4">Owner Rect</Label>
  27. <TextBox Name="CurrentOwnerRect" Grid.Column="1" Grid.Row="4" IsReadOnly="True" />
  28. <Label Grid.Column="0" Grid.Row="5">Screen Rect</Label>
  29. <TextBox Name="CurrentScreenRect" Grid.Column="1" Grid.Row="5" IsReadOnly="True" />
  30. <Label Grid.Column="0" Grid.Row="6">Scaling</Label>
  31. <TextBox Name="CurrentScaling" Grid.Column="1" Grid.Row="6" IsReadOnly="True" />
  32. <Label Grid.Column="0" Grid.Row="7">WindowState</Label>
  33. <ComboBox Name="CurrentWindowState" Grid.Column="1" Grid.Row="7" SelectedIndex="{Binding WindowState}">
  34. <ComboBoxItem Name="WindowStateNormal">Normal</ComboBoxItem>
  35. <ComboBoxItem Name="WindowStateMinimized">Minimized</ComboBoxItem>
  36. <ComboBoxItem Name="WindowStateMaximized">Maximized</ComboBoxItem>
  37. <ComboBoxItem Name="WindowStateFullScreen">FullScreen</ComboBoxItem>
  38. </ComboBox>
  39. <Label Grid.Column="0" Grid.Row="8">SystemDecorations</Label>
  40. <ComboBox Name="CurrentSystemDecorations" Grid.Column="1" Grid.Row="8" SelectedIndex="{Binding SystemDecorations}">
  41. <ComboBoxItem Name="SystemDecorationsNone">None</ComboBoxItem>
  42. <ComboBoxItem Name="SystemDecorationsBorderOnly">BorderOnly</ComboBoxItem>
  43. <ComboBoxItem Name="SystemDecorationsFull">Full</ComboBoxItem>
  44. </ComboBox>
  45. <CheckBox Name="CurrentExtendClientAreaToDecorationsHint" Grid.ColumnSpan="2" Grid.Row="9"
  46. IsChecked="{Binding ExtendClientAreaToDecorationsHint}">
  47. ExtendClientAreaToDecorationsHint
  48. </CheckBox>
  49. <Label Grid.Column="0" Grid.Row="10">Order (mac)</Label>
  50. <TextBox Name="CurrentOrder" Grid.Column="1" Grid.Row="10" IsReadOnly="True" />
  51. <Label Grid.Row="11" Content="MeasuredWith:" />
  52. <TextBlock Grid.Column="1" Grid.Row="11" Name="CurrentMeasuredWithText" Text="{Binding #MyBorder.MeasuredWith}" />
  53. <Label Grid.Column="3" Grid.Row="1">Mouse Move Event Count</Label>
  54. <TextBox Name="MouseMoveCount" Grid.Column="4" Grid.Row="1" IsReadOnly="True" Text="0" />
  55. <Label Grid.Column="3" Grid.Row="2">Mouse Down Event Count</Label>
  56. <TextBox Name="MouseDownCount" Grid.Column="4" Grid.Row="2" IsReadOnly="True" Text="0" />
  57. <Label Grid.Column="3" Grid.Row="3">Mouse Release Event Count</Label>
  58. <TextBox Name="MouseReleaseCount" Grid.Column="4" Grid.Row="3" IsReadOnly="True" Text="0" />
  59. <Label Grid.Column="3" Grid.Row="4">Double-Click Event Count</Label>
  60. <TextBox Name="DoubleClickCount" Grid.Column="4" Grid.Row="4" IsReadOnly="True" Text="0" />
  61. <StackPanel Orientation="Horizontal" Grid.Row="12" Grid.ColumnSpan="5">
  62. <Button Name="HideButton" Command="{Binding $parent[Window].Hide}">Hide</Button>
  63. <Button Name="AddToWidth" Click="AddToWidth_Click">Add to Width</Button>
  64. <Button Name="AddToHeight" Click="AddToHeight_Click">Add to Height</Button>
  65. </StackPanel>
  66. </Grid>
  67. </integrationTestApp:MeasureBorder>
  68. </Grid>
  69. </Window>