1
我的工作在Windows Store應用(Windows 8.1中),我使用這樣的搜索框:的XAML相互作用不能在Windows工作10
<SearchBox x:Name="SearchText" QueryText="{Binding QueryText, Mode=TwoWay}">
<i:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="QuerySubmitted">
<core:InvokeCommandAction Command="{Binding SearchCommand}" />
</core:EventTriggerBehavior>
</i:Interaction.Behaviors>
</SearchBox>
這是在Windows 8.1工作正常,但我只是測試Windows 10的預覽版本並發現SearchCommand未觸發。當我在後面的代碼中添加事件處理程序時,QuerySubmitted事件正確觸發,因此看起來綁定不起作用。有沒有人遇到同樣的問題?
我不認爲這一切的XAML互動,因爲我已經發現別人(如Button.Click)的工作。然而,我遇到了與SearchBox.QuerySubmitted相同的問題,甚至試圖只是一個普通的事件連接到代碼隱藏不起作用。 – 2015-08-14 02:46:46