Repository navigation
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? |
2 replies
|
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 |
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm struggling with the migration to Popup v2, especially with the
CanBeDismissedByTappingOutsideOfPopupproperty, 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
CanBeDismissedByTappingOutsideOfPopupbindable property is defined by the popup itself ? I understand I need to usePopupOptions, but I think I'm missing something...All reactions