-1
設置在ContentControl中的孩子
我背後有響應的一些事情我已經設置了編輯器歡迎使用屬性爲爲什麼不是我的風格得到WPF
WPF<ContentControl>
<ContentControl.Resources>
<Style TargetType="selections:EntitySelector">
<Setter
Property="EntitySelectorManager"
Value="{Binding SelectorManager, Mode=OneWay }"/>
</Style>
</ContentControl.Resources>
<ContentControl.Content>
<Binding Path="Editor" />
</ContentControl.Content>
</ContentControl>
然後在代碼下面的XAML代碼
this.Editor = element
其中元素是包含一個或多個對象的控件EntitySelector對象。然而,一旦控制在視覺樹中實例化,我可以看到綁定沒有起作用。
首先,我檢查了的DataContext的SelectorManager財產在ContentControl中的水平。這似乎是爲了
現在我進入ContentControl中,看看是否有任何EntitySelector控制有自己的EntitySelectorManager屬性進行設置。
你可以看到有一個綁定表達式,但結果是零。爲什麼是這樣?