[New Control] Descriptions (#791)
* 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>
This commit is contained in:
@@ -15,20 +15,28 @@
|
||||
<vm:MainWindowViewModel />
|
||||
</Design.DataContext>
|
||||
<StackPanel>
|
||||
<Button Content="???" Click="Button_OnClick"></Button>
|
||||
<ContentControl Name="content">
|
||||
<ContentControl.DataTemplates>
|
||||
<DataTemplate DataType="x:Int32">
|
||||
<u:Breadcrumb Separator="·" Classes="Margin">
|
||||
<u:BreadcrumbItem Content="a" />
|
||||
<u:BreadcrumbItem Content="b" />
|
||||
<u:BreadcrumbItem Content="c" />
|
||||
</u:Breadcrumb>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="x:Double">
|
||||
<TextBlock Text="Hello World"/>
|
||||
</DataTemplate>
|
||||
</ContentControl.DataTemplates>
|
||||
</ContentControl>
|
||||
<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>
|
||||
Reference in New Issue
Block a user