0
導致StackOverflowException
的頁面上的示例xaml代碼。 如果從第二個元素中刪除MyProperty="{Binding ElementName=SourceFlyout}"
,則可以使用 。 MyProperty
是附屬財產。 AdvancedBehavior
是最簡單的行爲類,錯誤很容易被重現。 MyProperty
是一個空的附屬或依賴屬性,裏面沒有邏輯。怎麼了?引起StackOverflowException的依賴屬性
<ListPickerFlyout x:Name="SourceFlyout">
<helpers:XamlExtention.Behaviors>
<helpers:BehaviorCollection>
<behaviors:AdvancedBehavior MyProperty="{Binding ElementName=DestinationFlyout}" />
</helpers:BehaviorCollection>
</helpers:XamlExtention.Behaviors>
</ListPickerFlyout>
<ListPickerFlyout x:Name="DestinationFlyout">
<helpers:XamlExtention.Behaviors>
<helpers:BehaviorCollection>
<behaviors:AdvancedBehavior MyProperty="{Binding ElementName=SourceFlyout}" />
</helpers:BehaviorCollection>
</helpers:XamlExtention.Behaviors>
</ListPickerFlyout>
所附屬性的最終實際數據是多少? – OmegaMan
ListPickerFlyout – Dmitry
「ListPickerFlyout」的實際定義是什麼? – OmegaMan