Skip to content

Best approach for version 10 EventToCommandBehavior adjustements #2507

Closed Answered by stephenquan
maslewandowski asked this question in Q&A
Discussion options

You must be logged in to vote

There's some critical information that's missing from your snippet that prevents us to answer properly, so, I will fill in the gaps with the following assumptions:

  • The namespace of your app is missing, let's assume it's ExampleApp.Maui
  • The x:Class is missing, let's assume it's ExampleApp.Maui.MainPage
  • Let's assume you added NavigatedToCommand as a property on MainPage

Typically, the rule I follow for BindingContext and x:DataType is

  • If I do set BindingContext then, I should set x:DataType at the same level to the "same thing"
  • x:DataType should point to a type that contains the thing that's offering the property you need, most likely MainPage
  • If you're using Binding Source, then make su…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Kavik00
Comment options

@stephenquan
Comment options

@Kavik00
Comment options

Answer selected by maslewandowski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants