0

アイテム コントロールがあり、アイテム コントロールのアイテム パネルにパネルを配置しました。コンバーターを使用してパネルの高さを設定したいので、このコンバーターでアイテム コントロールの高さプロパティにアクセスする必要がありますが、0.0 が返されます。

実際の要件は、パネルの高さに基づいて、パネルの ArrangeOverride メソッドで特定の順序でオブジェクトを配置する必要があるため、ArrangeOverride メソッドで高さまたは幅のパネルが取得されることを知る必要があります。

<Grid Grid.Row="0" x:Name="CircleGrid"
                          Grid.Column="0"
                          Grid.ColumnSpan="3">
                        <ItemsControl Name="CircleNavigatorItemsControl"
                                      Grid.Row="1"
                                      ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type UserControl}},
                            Path=DataContext.DocumentsItemsSource}">
                            <ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <controls:CircularLayoutPanel x:Name="CircularPanel"  >
                                        <controls:CircularLayoutPanel.InnerRadius>
                                            <MultiBinding Converter="{StaticResource CircleNavigatorWidthConverter}" ConverterParameter="True">
                                                <Binding  Path="ActualHeight" ElementName="CircleNavigatorItemsControl" Mode="TwoWay"/>
                                            </MultiBinding>
4

1 に答える 1