Replies: 2 comments 9 replies
-
I don't this is currently possible as the responsibility has shifted from the popup to the caller. Unless @TheCodeTraveler knows something I don't? |
Beta Was this translation helpful? Give feedback.
-
All of the properties in You'll create a new instance of PopupOptions and bind to it just like you would for any binding: https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.bindableobjectextensions.setbinding?view=net-maui-9.0#microsoft-maui-controls-bindableobjectextensions-setbinding-2(microsoft-maui-controls-bindableobject-microsoft-maui-controls-bindableproperty-system-func((-0-1))-microsoft-maui-controls-bindingmode-microsoft-maui-controls-ivalueconverter-system-object-system-string-system-object-system-object-system-object) var options = new PopupOptions()
options.SetBinding(PopupOptions.CanBeDismissedByTappingOutsideOfPopupProperty, (TViewModel) vm => vm.CanBeDismissed); // replace TViewModel with the type of your View Model |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm struggling with the migration to Popup v2, especially with the
CanBeDismissedByTappingOutsideOfPopup
property, that was previously a bindable property of the Popup itself.Could you please provide an example for the migration of a XAML popup, for which the
CanBeDismissedByTappingOutsideOfPopup
bindable property is defined by the popup itself ? I understand I need to usePopupOptions
, but I think I'm missing something...Beta Was this translation helpful? Give feedback.
All reactions