60 lines
3.0 KiB
XML
60 lines
3.0 KiB
XML
<UserControl
|
|
x:Class="BeWo.View.VarFieldView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:localView="clr-namespace:BeWo.View"
|
|
xmlns:localcore="clr-namespace:BeWo.Core"
|
|
Width="Auto"
|
|
Height="Auto"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Focusable="True">
|
|
<Grid>
|
|
<ItemsControl
|
|
Name="lv_root"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<WrapPanel Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<GroupBox
|
|
x:Name="GROUPBOX"
|
|
Margin="3"
|
|
VerticalAlignment="Top"
|
|
Header="{Binding Key.GroupName}"
|
|
Style="{StaticResource ObjectEditGroupBox}">
|
|
<Grid>
|
|
<ItemsControl ItemsSource="{Binding Value}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<Grid
|
|
localcore:BeWoWpfUtils.AutoHeightRowCount="{Binding Key.RowCount}"
|
|
localcore:BeWoWpfUtils.AutoWidthColumnCount="{Binding Key.ColumnCount}"
|
|
Grid.IsSharedSizeScope="True" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<localView:VarFieldEditControl VarFieldVM="{Binding}" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
<ItemsControl.ItemContainerStyle>
|
|
<Style TargetType="{x:Type ContentPresenter}">
|
|
<Setter Property="Grid.Row" Value="{Binding YCoordinate}" />
|
|
<Setter Property="Grid.Column" Value="{Binding XCoordinate}" />
|
|
<Setter Property="Grid.RowSpan" Value="{Binding RowSpan}" />
|
|
<Setter Property="Grid.ColumnSpan" Value="{Binding ColumnSpan}" />
|
|
</Style>
|
|
</ItemsControl.ItemContainerStyle>
|
|
</ItemsControl>
|
|
</Grid>
|
|
</GroupBox>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Grid>
|
|
</UserControl> |