This commit is contained in:
Wiesław Šoltés 2021-05-18 21:52:34 +02:00
Родитель 4211e0c2ea
Коммит e3f00d0347
1 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -2,6 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:converters="clr-namespace:GridDemo.Converters"
xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
xmlns:behaviors="clr-namespace:GridDemo.Behaviors"
xmlns:controls="clr-namespace:GridDemo.Controls"
@ -27,7 +28,7 @@
</ComboBox.ItemTemplate>
</ComboBox>
<DockPanel x:Name="Panel">
<DockPanel x:Name="Panel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<i:Interaction.Behaviors>
<behaviors:BoundsObserverBehavior Bounds="{Binding #Panel.Bounds, Mode=OneWay}"
Width="{Binding WidthSource, Mode=TwoWay}"
@ -37,9 +38,9 @@
<ScrollViewer VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"
VerticalAlignment="Center"
HorizontalAlignment="Center"
DockPanel.Dock="Top">
VerticalAlignment="Top"
HorizontalAlignment="Left"
DockPanel.Dock="{Binding LayoutIndex, Converter={x:Static converters:TilesPositionConverter.Instance}}">
<ItemsControl Items="{Binding Tiles}">
<ItemsControl.Styles>
<Style Selector="ItemsControl > ContentPresenter" x:DataType="tc:TileViewModel">
@ -74,7 +75,9 @@
</ItemsControl>
</ScrollViewer>
<ListBox>
<ListBox DockPanel.Dock="Bottom"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch">
<ListBoxItem>Item1</ListBoxItem>
<ListBoxItem>Item2</ListBoxItem>
<ListBoxItem>Item3</ListBoxItem>
@ -82,8 +85,6 @@
</DockPanel>
</DockPanel>
</Window>