feat: FixToRB demo.
This commit is contained in:
@@ -149,78 +149,84 @@
|
|||||||
|
|
||||||
<TabItem Header="FixToRB">
|
<TabItem Header="FixToRB">
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
|
<StackPanel DockPanel.Dock="Top" x:Name="ControlBar2">
|
||||||
<TextBlock Text="输入控件宽度" VerticalAlignment="Center" />
|
<StackPanel Orientation="Horizontal">
|
||||||
<Grid>
|
<TextBlock Text="Control Width" />
|
||||||
<Rectangle x:Name="Rect2" />
|
<TextBox Text="{Binding ItemSelfWidth}" />
|
||||||
<TextBox MinWidth="60" Height="22" VerticalContentAlignment="Center"
|
<TextBlock Text="Control Height" />
|
||||||
Text="{Binding ElementName=Rect2,Path=Width,Mode=TwoWay}" />
|
<TextBox Text="{Binding ItemSelfHeight}" />
|
||||||
</Grid>
|
</StackPanel>
|
||||||
<TextBlock Text="输入控件高度" VerticalAlignment="Center" />
|
<StackPanel Orientation="Horizontal">
|
||||||
<Grid>
|
<TextBlock Text="Horizontal Alignment" />
|
||||||
<TextBox MinWidth="60" Height="22" VerticalContentAlignment="Center"
|
<ComboBox SelectedItem="{Binding CmbHAlign}"
|
||||||
Text="{Binding ElementName=Rect2,Path=Height,Mode=TwoWay}" />
|
ItemsSource="{Binding CmbHAligns}" />
|
||||||
</Grid>
|
<TextBlock Text="Vertical Alignment" />
|
||||||
<ComboBox x:Name="cmbVerAlig" SelectedIndex="3" Width="70">
|
<ComboBox SelectedItem="{Binding CmbVAlign}"
|
||||||
<VerticalAlignment>Top</VerticalAlignment>
|
ItemsSource="{Binding CmbVAligns}" />
|
||||||
<VerticalAlignment>Center</VerticalAlignment>
|
</StackPanel>
|
||||||
<VerticalAlignment>Bottom</VerticalAlignment>
|
<StackPanel.Styles>
|
||||||
<VerticalAlignment>Stretch</VerticalAlignment>
|
<Style Selector="StackPanel#ControlBar2 > StackPanel > TextBlock">
|
||||||
</ComboBox>
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
<ComboBox x:Name="cmbHorAlig" SelectedIndex="3" Width="70">
|
<Setter Property="Margin" Value="10 0" />
|
||||||
<HorizontalAlignment>Left</HorizontalAlignment>
|
</Style>
|
||||||
<HorizontalAlignment>Center</HorizontalAlignment>
|
<Style Selector="StackPanel#ControlBar2 > StackPanel > TextBox, NumericUpDown">
|
||||||
<HorizontalAlignment>Right</HorizontalAlignment>
|
<Setter Property="Width" Value="100" />
|
||||||
<HorizontalAlignment>Stretch</HorizontalAlignment>
|
</Style>
|
||||||
</ComboBox>
|
<Style Selector="StackPanel#ControlBar2 > StackPanel > ComboBox">
|
||||||
|
<Setter Property="Width" Value="130" />
|
||||||
|
</Style>
|
||||||
|
</StackPanel.Styles>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<TabControl>
|
<TabControl>
|
||||||
<TabItem Header="一个">
|
<TabItem Header="Single">
|
||||||
<StackPanel x:Name="UnifornGrid1">
|
<StackPanel>
|
||||||
<ScrollViewer
|
<ScrollViewer
|
||||||
HorizontalScrollBarVisibility="{Binding HorizontalVisibility}"
|
HorizontalScrollBarVisibility="{Binding HorizontalVisibility}"
|
||||||
VerticalScrollBarVisibility="{Binding VerticalVisibility}">
|
VerticalScrollBarVisibility="{Binding VerticalVisibility}">
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<Label Content="WrapPanel" Background="#FFCBCBEA" DockPanel.Dock="Top" />
|
<Label DockPanel.Dock="Top"
|
||||||
|
Content="WrapPanel"
|
||||||
|
Background="{DynamicResource SemiPurple2Color}" />
|
||||||
<WrapPanel ItemWidth="{Binding ItemWidth}"
|
<WrapPanel ItemWidth="{Binding ItemWidth}"
|
||||||
ItemHeight="{Binding ItemHeight}"
|
ItemHeight="{Binding ItemHeight}"
|
||||||
Orientation="{Binding SelectedOrientation}">
|
Orientation="{Binding SelectedOrientation}">
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容1" VerticalAlignment="Center" />
|
<TextBlock Text="Content 1" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容2" VerticalAlignment="Center" />
|
<TextBlock Text="Content 2" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容3" VerticalAlignment="Center" />
|
<TextBlock Text="Content 3" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容4" VerticalAlignment="Center" />
|
<TextBlock Text="Content 4" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容5" VerticalAlignment="Center" />
|
<TextBlock Text="Content 5" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容6" VerticalAlignment="Center" />
|
<TextBlock Text="Content 6" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<UniformGrid Rows="1" Margin="5,0" MinWidth="200"
|
<UniformGrid Rows="1" Margin="5,0" MinWidth="200"
|
||||||
u:ElasticWrapPanel.FixToRB="True"
|
u:ElasticWrapPanel.FixToRB="True"
|
||||||
HorizontalAlignment="{Binding ElementName=cmbHorAlig,Path=SelectedValue}"
|
HorizontalAlignment="{Binding CmbHAlign}"
|
||||||
VerticalAlignment="{Binding ElementName=cmbVerAlig,Path=SelectedValue}">
|
VerticalAlignment="{Binding CmbVAlign}">
|
||||||
<Button Content="查询" MinHeight="22" Margin="1" />
|
<Button Content="Search" MinHeight="20" Margin="1" />
|
||||||
<Button Content="导出" MinHeight="22" Margin="1" />
|
<Button Content="Export" MinHeight="20" Margin="1" />
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
@@ -229,139 +235,143 @@
|
|||||||
HorizontalScrollBarVisibility="{Binding HorizontalVisibility}"
|
HorizontalScrollBarVisibility="{Binding HorizontalVisibility}"
|
||||||
VerticalScrollBarVisibility="{Binding VerticalVisibility}">
|
VerticalScrollBarVisibility="{Binding VerticalVisibility}">
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<Label Content="ElasticWrapPanel" Background="#FFB4F1AA"
|
<Label DockPanel.Dock="Top"
|
||||||
DockPanel.Dock="Top" />
|
Content="ElasticWrapPanel"
|
||||||
|
Background="{DynamicResource SemiGreen2Color}" />
|
||||||
<u:ElasticWrapPanel
|
<u:ElasticWrapPanel
|
||||||
IsFillHorizontal="{Binding IsFillHorizontal}"
|
IsFillHorizontal="{Binding IsFillHorizontal}"
|
||||||
IsFillVertical="{Binding IsFillVertical}"
|
IsFillVertical="{Binding IsFillVertical}"
|
||||||
ItemWidth="{Binding ItemWidth}"
|
ItemWidth="{Binding ItemWidth}"
|
||||||
ItemHeight="{Binding ItemHeight}"
|
ItemHeight="{Binding ItemHeight}"
|
||||||
Orientation="{Binding SelectedOrientation}">
|
Orientation="{Binding SelectedOrientation}">
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容1" VerticalAlignment="Center" />
|
<TextBlock Text="Content 1" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容2" VerticalAlignment="Center" />
|
<TextBlock Text="Content 2" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容3" VerticalAlignment="Center" />
|
<TextBlock Text="Content 3" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容4" VerticalAlignment="Center" />
|
<TextBlock Text="Content 4" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容5" VerticalAlignment="Center" />
|
<TextBlock Text="Content 5" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容6" VerticalAlignment="Center" />
|
<TextBlock Text="Content 6" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<UniformGrid Rows="1" Margin="5,0" MinWidth="200"
|
<UniformGrid Rows="1" Margin="5,0" MinWidth="200"
|
||||||
u:ElasticWrapPanel.FixToRB="True"
|
u:ElasticWrapPanel.FixToRB="True"
|
||||||
HorizontalAlignment="{Binding ElementName=cmbHorAlig,Path=SelectedValue}"
|
HorizontalAlignment="{Binding CmbHAlign}"
|
||||||
VerticalAlignment="{Binding ElementName=cmbVerAlig,Path=SelectedValue}">
|
VerticalAlignment="{Binding CmbVAlign}">
|
||||||
<Button Content="查询" MinHeight="22" Margin="1" />
|
<Button Content="Search" MinHeight="20" Margin="1" />
|
||||||
<Button Content="导出" MinHeight="22" Margin="1" />
|
<Button Content="Export" MinHeight="20" Margin="1" />
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</u:ElasticWrapPanel>
|
</u:ElasticWrapPanel>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="多个">
|
<TabItem Header="Multiply">
|
||||||
<StackPanel x:Name="UnifornGrid2">
|
<StackPanel>
|
||||||
<ScrollViewer
|
<ScrollViewer
|
||||||
HorizontalScrollBarVisibility="{Binding HorizontalVisibility}"
|
HorizontalScrollBarVisibility="{Binding HorizontalVisibility}"
|
||||||
VerticalScrollBarVisibility="{Binding VerticalVisibility}">
|
VerticalScrollBarVisibility="{Binding VerticalVisibility}">
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<Label Content="WrapPanel" Background="#FFCBCBEA" DockPanel.Dock="Top" />
|
<Label
|
||||||
|
DockPanel.Dock="Top"
|
||||||
|
Content="WrapPanel"
|
||||||
|
Background="{DynamicResource SemiPurple2Color}" />
|
||||||
<WrapPanel ItemWidth="{Binding ItemWidth}"
|
<WrapPanel ItemWidth="{Binding ItemWidth}"
|
||||||
ItemHeight="{Binding ItemHeight}"
|
ItemHeight="{Binding ItemHeight}"
|
||||||
Orientation="{Binding SelectedOrientation}">
|
Orientation="{Binding SelectedOrientation}">
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容1" VerticalAlignment="Center" />
|
<TextBlock Text="Content 1" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容2" VerticalAlignment="Center" />
|
<TextBlock Text="Content 2" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容3" VerticalAlignment="Center" />
|
<TextBlock Text="Content 3" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容4" VerticalAlignment="Center" />
|
<TextBlock Text="Content 4" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容5" VerticalAlignment="Center" />
|
<TextBlock Text="Content 5" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容6" VerticalAlignment="Center" />
|
<TextBlock Text="Content 6" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<UniformGrid Rows="1" Margin="5,0" MinWidth="200"
|
<UniformGrid Rows="1" Margin="5,0" MinWidth="200"
|
||||||
u:ElasticWrapPanel.FixToRB="True"
|
u:ElasticWrapPanel.FixToRB="True"
|
||||||
HorizontalAlignment="{Binding ElementName=cmbHorAlig,Path=SelectedValue}"
|
HorizontalAlignment="{Binding CmbHAlign}"
|
||||||
VerticalAlignment="{Binding ElementName=cmbVerAlig,Path=SelectedValue}">
|
VerticalAlignment="{Binding CmbVAlign}">
|
||||||
<Button Content="查询" MinHeight="22" Margin="1" />
|
<Button Content="Search" MinHeight="20" Margin="1" />
|
||||||
<Button Content="导出" MinHeight="22" Margin="1" />
|
<Button Content="Export" MinHeight="20" Margin="1" />
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容1" VerticalAlignment="Center" />
|
<TextBlock Text="Content 1" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容2" VerticalAlignment="Center" />
|
<TextBlock Text="Content 2" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容3" VerticalAlignment="Center" />
|
<TextBlock Text="Content 3" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容4" VerticalAlignment="Center" />
|
<TextBlock Text="Content 4" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容5" VerticalAlignment="Center" />
|
<TextBlock Text="Content 5" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容6" VerticalAlignment="Center" />
|
<TextBlock Text="Content 6" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<UniformGrid Rows="1" Margin="5,0" MinWidth="200"
|
<UniformGrid Rows="1" Margin="5,0" MinWidth="200"
|
||||||
u:ElasticWrapPanel.FixToRB="True"
|
u:ElasticWrapPanel.FixToRB="True"
|
||||||
HorizontalAlignment="{Binding ElementName=cmbHorAlig,Path=SelectedValue}"
|
HorizontalAlignment="{Binding CmbHAlign}"
|
||||||
VerticalAlignment="{Binding ElementName=cmbVerAlig,Path=SelectedValue}">
|
VerticalAlignment="{Binding CmbVAlign}">
|
||||||
<Button Content="查询" MinHeight="22" Margin="1" />
|
<Button Content="Search" MinHeight="20" Margin="1" />
|
||||||
<Button Content="导出" MinHeight="22" Margin="1" />
|
<Button Content="Export" MinHeight="20" Margin="1" />
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
@@ -370,87 +380,88 @@
|
|||||||
HorizontalScrollBarVisibility="{Binding HorizontalVisibility}"
|
HorizontalScrollBarVisibility="{Binding HorizontalVisibility}"
|
||||||
VerticalScrollBarVisibility="{Binding VerticalVisibility}">
|
VerticalScrollBarVisibility="{Binding VerticalVisibility}">
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<Label Content="ElasticWrapPanel" Background="#FFB4F1AA"
|
<Label DockPanel.Dock="Top"
|
||||||
DockPanel.Dock="Top" />
|
Content="ElasticWrapPanel"
|
||||||
|
Background="{DynamicResource SemiGreen2Color}" />
|
||||||
<u:ElasticWrapPanel
|
<u:ElasticWrapPanel
|
||||||
IsFillHorizontal="{Binding IsFillHorizontal}"
|
IsFillHorizontal="{Binding IsFillHorizontal}"
|
||||||
IsFillVertical="{Binding IsFillVertical}"
|
IsFillVertical="{Binding IsFillVertical}"
|
||||||
ItemWidth="{Binding ItemWidth}"
|
ItemWidth="{Binding ItemWidth}"
|
||||||
ItemHeight="{Binding ItemHeight}"
|
ItemHeight="{Binding ItemHeight}"
|
||||||
Orientation="{Binding SelectedOrientation}">
|
Orientation="{Binding SelectedOrientation}">
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容1" VerticalAlignment="Center" />
|
<TextBlock Text="Content 1" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容2" VerticalAlignment="Center" />
|
<TextBlock Text="Content 2" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容3" VerticalAlignment="Center" />
|
<TextBlock Text="Content 3" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容4" VerticalAlignment="Center" />
|
<TextBlock Text="Content 4" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容5" VerticalAlignment="Center" />
|
<TextBlock Text="Content 5" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容6" VerticalAlignment="Center" />
|
<TextBlock Text="Content 6" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<UniformGrid Rows="1" Margin="5,0" MinWidth="200"
|
<UniformGrid Rows="1" Margin="5,0" MinWidth="200"
|
||||||
u:ElasticWrapPanel.FixToRB="True"
|
u:ElasticWrapPanel.FixToRB="True"
|
||||||
HorizontalAlignment="{Binding ElementName=cmbHorAlig,Path=SelectedValue}"
|
HorizontalAlignment="{Binding CmbHAlign}"
|
||||||
VerticalAlignment="{Binding ElementName=cmbVerAlig,Path=SelectedValue}">
|
VerticalAlignment="{Binding CmbVAlign}">
|
||||||
<Button Content="查询" MinHeight="22" Margin="1" />
|
<Button Content="Search" MinHeight="20" Margin="1" />
|
||||||
<Button Content="导出" MinHeight="22" Margin="1" />
|
<Button Content="Export" MinHeight="20" Margin="1" />
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容1" VerticalAlignment="Center" />
|
<TextBlock Text="Content 1" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容2" VerticalAlignment="Center" />
|
<TextBlock Text="Content 2" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容3" VerticalAlignment="Center" />
|
<TextBlock Text="Content 3" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容4" VerticalAlignment="Center" />
|
<TextBlock Text="Content 4" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容5" VerticalAlignment="Center" />
|
<TextBlock Text="Content 5" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<DockPanel Margin="0,2" Width="{Binding ElementName=Rect2,Path=Width}"
|
<DockPanel Width="{Binding ItemSelfWidth}"
|
||||||
Height="{Binding ElementName=Rect2,Path=Height}">
|
Height="{Binding ItemSelfHeight}">
|
||||||
<TextBlock Text="内容6" VerticalAlignment="Center" />
|
<TextBlock Text="Content 6" VerticalAlignment="Center" />
|
||||||
<TextBox MinHeight="23" />
|
<TextBox MinHeight="20" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<UniformGrid Rows="1" Margin="5,0" MinWidth="200"
|
<UniformGrid Rows="1" Margin="5,0" MinWidth="200"
|
||||||
u:ElasticWrapPanel.FixToRB="True"
|
u:ElasticWrapPanel.FixToRB="True"
|
||||||
HorizontalAlignment="{Binding ElementName=cmbHorAlig,Path=SelectedValue}"
|
HorizontalAlignment="{Binding CmbHAlign}"
|
||||||
VerticalAlignment="{Binding ElementName=cmbVerAlig,Path=SelectedValue}">
|
VerticalAlignment="{Binding CmbVAlign}">
|
||||||
<Button Content="查询" MinHeight="22" Margin="1" />
|
<Button Content="Search" MinHeight="20" Margin="1" />
|
||||||
<Button Content="导出" MinHeight="22" Margin="1" />
|
<Button Content="Export" MinHeight="20" Margin="1" />
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</u:ElasticWrapPanel>
|
</u:ElasticWrapPanel>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ public partial class ElasticWrapPanelDemoViewModel : ObservableObject
|
|||||||
[ObservableProperty] private double? _itemWidth;
|
[ObservableProperty] private double? _itemWidth;
|
||||||
[ObservableProperty] private double? _itemHeight;
|
[ObservableProperty] private double? _itemHeight;
|
||||||
|
|
||||||
|
[ObservableProperty] private double? _itemSelfWidth;
|
||||||
|
[ObservableProperty] private double? _itemSelfHeight;
|
||||||
|
|
||||||
|
[ObservableProperty] private HorizontalAlignment _cmbHAlign;
|
||||||
|
[ObservableProperty] private VerticalAlignment _cmbVAlign;
|
||||||
|
[ObservableProperty] private ObservableCollection<HorizontalAlignment> _cmbHAligns = null!;
|
||||||
|
[ObservableProperty] private ObservableCollection<VerticalAlignment> _cmbVAligns = null!;
|
||||||
|
|
||||||
public ElasticWrapPanelDemoViewModel()
|
public ElasticWrapPanelDemoViewModel()
|
||||||
{
|
{
|
||||||
@@ -38,5 +45,25 @@ public partial class ElasticWrapPanelDemoViewModel : ObservableObject
|
|||||||
IsFillVertical = false;
|
IsFillVertical = false;
|
||||||
ItemWidth = 40d;
|
ItemWidth = 40d;
|
||||||
ItemHeight = 40d;
|
ItemHeight = 40d;
|
||||||
|
|
||||||
|
ItemSelfWidth = double.NaN;
|
||||||
|
ItemSelfHeight = double.NaN;
|
||||||
|
|
||||||
|
CmbHAligns = new ObservableCollection<HorizontalAlignment>()
|
||||||
|
{
|
||||||
|
HorizontalAlignment.Stretch,
|
||||||
|
HorizontalAlignment.Left,
|
||||||
|
HorizontalAlignment.Center,
|
||||||
|
HorizontalAlignment.Right
|
||||||
|
};
|
||||||
|
CmbVAligns = new ObservableCollection<VerticalAlignment>()
|
||||||
|
{
|
||||||
|
VerticalAlignment.Stretch,
|
||||||
|
VerticalAlignment.Top,
|
||||||
|
VerticalAlignment.Center,
|
||||||
|
VerticalAlignment.Bottom
|
||||||
|
};
|
||||||
|
CmbHAlign = HorizontalAlignment.Stretch;
|
||||||
|
CmbVAlign = VerticalAlignment.Stretch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user