私はプロパティにセッター値をバインドしようとしているが、私が試したSilverlightのバインディング問題
0x8000ffffが返さ致命的なエラーを得続けるこの:
次に、この:
<ItemsControl.Style>
<Style TargetType="ContentPresenter">
<Setter Property="Grid.Row"
Value="0" />
<Setter Property="Grid.Column"
Value="0" />
</Style>
</ItemsControl.Style>
TargetTypeを取得するためにSL5にアップグレードする必要がありました。 2番目の例では、バインドしようとする試みはすべて削除されますが、「Catastrophically」には失敗します。
<ItemsControl.ItemsPanel> <ItemsPanelTemplate> <layout:MatrixGrid /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel>
(他の誰かによって例で説明したように)私は、グリッド内のデータの行列を作成しようとしています。
ItemsControl(Silverlight版)にはItemContainerStyle要素がありませんので、これを試しています。
<ListBox.ItemsPanel> <ItemsPanelTemplate> <layout:MatrixGrid /> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ItemContainerStyle> <Style TargetType="ContentPresenter"> <Setter Property="Grid.Row" Value="{Binding GridRow}" /> <Setter Property="Grid.Column" Value="{Binding GridColumn}" /> </Style> </ListBox.ItemContainerStyle>
このスタイルを使用している場所のコンテキストを表示できますか。 – ChrisF
こんにちはChrisF、ItemsControlでこれを使用しています – AlwaysLearning
あなたのスタイルが 'ItemsControl'の場合は、なぜTargetType =" ContentPresenter "を使用していますか? – Zabavsky