[英]Xamarin Forms stacklayout TapGestureRecognizer command not called
[英]How to add TapGestureRecognizer to outer StackLayout in Xamarin Forms
我有兩個嵌套的StackLayouts:
<StackLayout>
<StackLayout>
</StackLayout>
</StackLayout>
我想在外部StackLayout上添加單擊事件,單擊內部StackLayout時不會觸發該事件。 Xamarin形式有可能嗎? 如果我可以過濾click事件(帶有if塊),我也會很高興。
我認為您可以看看Rg Plugin彈出窗口 。
它具有此屬性
CloseWhenBackgroundIsClicked:單擊背景時關閉彈出窗口
You can add what you want to this popup because you can add a ContentPage
// Use these methods in PopupNavigation globally or Navigation in your pages
// Open new PopupPage
Task PushAsync(PopupPage page, bool animate = true) // Navigation.PushPopupAsync
// Hide last PopupPage
Task PopAsync(bool animate = true) // Navigation.PopPopupAsync
// Hide all PopupPage with animations
Task PopAllAsync(bool animate = true) // Navigation.PopAllPopupAsync
// Remove one popup page in stack
Task RemovePageAsync(PopupPage page, bool animate = true) // Navigation.RemovePopupPageAsync
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.