* feat: add ColumnWrapPanel. * feat: add Descriptions and DescriptionsItem controls * WIP: extract a LabeledContentControl for this particular need. * wip. * feat: setup demo. fix various initial status issue. * fix: fix a layout issue. * feat: improve demo. * feat: update demo. * fix: remove a redundant calculation. * feat: update per copilot feedback. * feat: add tests, fix a calculation issue. * feat: refactor to change the default label and value binding assignment logic. * feat: introduce orientation. * misc: format codes. * feat: clarify LabelPosition property. * feat: extract Font resources. * revert AvatarDemo. * feat: assign specific value to Font resources for testing. * misc: resolve copilot comment. --------- Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
42 lines
2.4 KiB
XML
42 lines
2.4 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:Sandbox.ViewModels"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:u="https://irihi.tech/ursa"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:Class="Sandbox.Views.MainWindow"
|
|
x:DataType="vm:MainWindowViewModel"
|
|
Icon="/Assets/avalonia-logo.ico"
|
|
Title="Sandbox">
|
|
<Design.DataContext>
|
|
<!-- This only sets the DataContext for the previewer in an IDE,
|
|
to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
|
|
<vm:MainWindowViewModel />
|
|
</Design.DataContext>
|
|
<StackPanel>
|
|
<StackPanel.Styles>
|
|
<Style Selector="Button">
|
|
<Setter Property="Margin" Value="10" />
|
|
</Style>
|
|
</StackPanel.Styles>
|
|
<u:ColumnWrapPanel Column="4" Width="500" Background="AntiqueWhite">
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" />
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" />
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" Width="200" />
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" />
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" />
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" />
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" Width="200" />
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" Width="150" />
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" />
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" />
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" Width="200" />
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" />
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" Width="200" />
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" />
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" />
|
|
<Button Content="Hello" Theme="{DynamicResource SolidButton}" />
|
|
</u:ColumnWrapPanel>
|
|
</StackPanel>
|
|
</Window> |