ShowWindowTest.axaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. <integrationTestApp:MeasureBorder Name="MyBorder">
  9. <Grid ColumnDefinitions="Auto,Auto" RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
  10. <Label Grid.Column="0" Grid.Row="1">Client Size</Label>
  11. <TextBox Name="CurrentClientSize" Grid.Column="1" Grid.Row="1" IsReadOnly="True"
  12. Text="{Binding ClientSize, Mode=OneWay}" />
  13. <Label Grid.Column="0" Grid.Row="2">Frame Size</Label>
  14. <TextBox Name="CurrentFrameSize" Grid.Column="1" Grid.Row="2" IsReadOnly="True"
  15. Text="{Binding FrameSize, Mode=OneWay}" />
  16. <Label Grid.Column="0" Grid.Row="3">Position</Label>
  17. <TextBox Name="CurrentPosition" Grid.Column="1" Grid.Row="3" IsReadOnly="True" />
  18. <Label Grid.Column="0" Grid.Row="4">Owner Rect</Label>
  19. <TextBox Name="CurrentOwnerRect" Grid.Column="1" Grid.Row="4" IsReadOnly="True" />
  20. <Label Grid.Column="0" Grid.Row="5">Screen Rect</Label>
  21. <TextBox Name="CurrentScreenRect" Grid.Column="1" Grid.Row="5" IsReadOnly="True" />
  22. <Label Grid.Column="0" Grid.Row="6">Scaling</Label>
  23. <TextBox Name="CurrentScaling" Grid.Column="1" Grid.Row="6" IsReadOnly="True" />
  24. <Label Grid.Column="0" Grid.Row="7">WindowState</Label>
  25. <ComboBox Name="CurrentWindowState" Grid.Column="1" Grid.Row="7" SelectedIndex="{Binding WindowState}">
  26. <ComboBoxItem Name="WindowStateNormal">Normal</ComboBoxItem>
  27. <ComboBoxItem Name="WindowStateMinimized">Minimized</ComboBoxItem>
  28. <ComboBoxItem Name="WindowStateMaximized">Maximized</ComboBoxItem>
  29. <ComboBoxItem Name="WindowStateFullScreen">FullScreen</ComboBoxItem>
  30. </ComboBox>
  31. <Label Grid.Column="0" Grid.Row="8">Order (mac)</Label>
  32. <TextBox Name="CurrentOrder" Grid.Column="1" Grid.Row="8" IsReadOnly="True" />
  33. <Label Grid.Row="9" Content="MeasuredWith:" />
  34. <TextBlock Grid.Column="1" Grid.Row="9" Name="CurrentMeasuredWithText" Text="{Binding #MyBorder.MeasuredWith}" />
  35. <Button Name="HideButton" Grid.Row="10" Command="{Binding $parent[Window].Hide}">Hide</Button>
  36. </Grid>
  37. </integrationTestApp:MeasureBorder>
  38. </Window>