Skip to content

Commit

Permalink
Fix x:DataType for ProportionalDockControl
Browse files Browse the repository at this point in the history
  • Loading branch information
wieslawsoltes committed Nov 12, 2024
1 parent 2682e08 commit 022e6b3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/Dock.Avalonia/Controls/ProportionalDockControl.axaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Dock.Avalonia.Converters"
xmlns:core="using:Dock.Model.Core">
xmlns:core="using:Dock.Model.Core"
xmlns:dmc="using:Dock.Model.Controls">
<Design.PreviewWith>
<ProportionalDockControl Width="300" Height="300" />
</Design.PreviewWith>
Expand All @@ -11,13 +12,16 @@
<Setter Property="Template">
<ControlTemplate>
<DockableControl TrackingMode="Visible">
<ItemsControl ItemsSource="{Binding VisibleDockables}">
<ItemsControl ItemsSource="{Binding VisibleDockables}"
x:DataType="dmc:IProportionalDock">
<ItemsControl.Styles>
<Style Selector="ItemsControl > ContentPresenter">
<Setter x:DataType="core:IDock" Property="(ProportionalStackPanel.Proportion)" Value="{Binding Proportion}" />
<Setter x:DataType="core:IDockable"
Property="(ProportionalStackPanel.Proportion)"
Value="{Binding Proportion}" />
<Setter Property="(ProportionalStackPanel.IsCollapsed)">
<Setter.Value>
<MultiBinding Converter="{x:Static BoolConverters.And}" x:DataType="core:IDock">
<MultiBinding Converter="{x:Static BoolConverters.And}" x:DataType="core:IDockable">
<CompiledBinding Path="IsCollapsable" />
<CompiledBinding Path="IsEmpty" />
</MultiBinding>
Expand All @@ -29,6 +33,7 @@
<ItemsPanelTemplate>
<ProportionalStackPanel DockProperties.IsDropArea="True"
Background="Transparent"
x:DataType="dmc:IProportionalDock"
Orientation="{Binding Orientation, Converter={x:Static converters:OrientationConverter.Instance}}" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
Expand Down

0 comments on commit 022e6b3

Please sign in to comment.