Update SharedSize.xml

This commit is contained in:
Zihan Chen
2020-11-23 11:10:09 -08:00
parent 7a921e3b45
commit 4886cd9e31
5 changed files with 54 additions and 16 deletions
Binary file not shown.
Binary file not shown.
@@ -86,8 +86,7 @@
<Instance name="StackControlResource" content="File">Stack.xml</Instance>
<Instance name="FlowControlResource" content="File">Flow.xml</Instance>
<Instance name="TableControlResource" content="File">Table.xml</Instance>
<Instance name="SharedSizeControlResource" content="File">SharedSize.xml</Instance>
<Instance name="ResponsiveControlResource" content="File">Responsive.xml</Instance>
<Folder name="SharedSizeControlResource" content="Link">SharedSize.xml</Folder>
<InstanceStyle name="SharedStyle">
<Styles>
@@ -124,10 +123,6 @@
<TabPage Text="SharedSize" Alt="S">
<sample:SharedSizeControl/>
</TabPage>
<TabPage Text="ResponsiveContainer" Alt="R">
<sample:ResponsiveControl/>
</TabPage>
</att.Pages>
</Tab>
</Window>
@@ -1,5 +0,0 @@
<Instance ref.Class="sample::ResponsiveControl">
<CustomControl>
<Label Text="sample::ResponsiveControl"/>
</CustomControl>
</Instance>
@@ -1,5 +1,53 @@
<Instance ref.Class="sample::SharedSizeControl">
<CustomControl>
<Label Text="sample::SharedSizeControl"/>
</CustomControl>
</Instance>
<Folder>
<InstanceStyle name="SharedStyles">
<Styles>
<Style ref.Path="//Table + //Cell + //Stack + //StackItem + //SharedSizeRoot + //SharedSizeItem" MinSizeLimitation="LimitToElementAndChildren"/>
<Style ref.Path="//Table + //SharedSizeRoot + //SharedSizeItem" AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
<Style ref.Path="//Stack" Padding="5" AlignmentToParent="left:5 top:5 right:5 bottom:5"/>
<Style ref.Path="//Button + //GroupBox + //DocumentLabel">
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
</Style>
<Style ref.Path="//Table" BorderVisible="false" CellPadding="5"/>
<Style ref.Path="//DocumentLabel">
<att.BoundsComposition-set PreferredMinSize="y:30"/>
</Style>
<Style ref.Path="//SharedSizeItem" Group="HeightGroup" SharedHeight="true"/>
</Styles>
</InstanceStyle>
<Instance name="Control">
<Instance ref.Class="sample::SharedSizeControl" ref.Styles="res://MainWindow/SharedSizeControlResource/SharedStyles">
<CustomControl>
<SharedSizeRoot>
<Table>
<att.Rows>
<CellOption>composeType:MinSize</CellOption>
<CellOption>composeType:Percentage percentage:1.0</CellOption>
</att.Rows>
<att.Columns>
<CellOption>composeType:Percentage percentage:1.0</CellOption>
</att.Columns>
<Cell Site="row:0 column:0">
<GroupBox ref.Styles="widthGroup" Text="Type to change heights">
<SharedSizeItem>
<DocumentLabel EditMode="Editable" Text="Something"/>
</SharedSizeItem>
</GroupBox>
</Cell>
<Cell Site="row:1 column:0">
<GroupBox Text="&lt;SharedSizeItem SharedHeight=&quot;true&quot;/&gt;">
<Stack Direction="Vertical">
<StackItem><SharedSizeItem><Button Text="One"/></SharedSizeItem></StackItem>
<StackItem><SharedSizeItem><Button Text="Two"/></SharedSizeItem></StackItem>
<StackItem><SharedSizeItem><Button Text="Three"/></SharedSizeItem></StackItem>
</Stack>
</GroupBox>
</Cell>
</Table>
</SharedSizeRoot>
</CustomControl>
</Instance>
</Instance>
</Folder>