[英]WP8.1 AppBarButton holding event
如何檢測是否持有AppBarButton? 有一個Holding事件,但是即使我將AppBarButton的屬性IsHoldingEnabled設置為true,它也不會觸發。 甚至當我將CommandBar的IsHoldingEnabled設置為true時。
在您的appbar
xaml
代碼中嘗試此代碼。
<page.BottomAppBar>
<commandBar>
<commandBar.PrimaryCommands>
<appBarButton Label="formatting"
IsHoldingEnabled="True"
Holding="AppBarButton_Holding">
<appBarButton.Icon>
<pathIcon HorizontalAlignment="Center" VerticalAlignment="Center" Data="Some path"/>
</appBarButton.Icon>
</appBarButton>
</commandBar.PrimaryCommands>
</commandBar>
</page.BottomAppBar>
希望能幫助到你!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.