Skip to content

Are QueryProperties supposed to work with [ObservableProperty]? #546

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

You must be logged in to vote

If anyone in the future is stuck here, the comments above led us to these conclusions:

  • [QueryProperty] requires that you are using a somewhat (untested by me here) primitive type OR that your type implements IConvertible. If you're using derived classes and may pass those as parameters through the navigation system, I would just assume the [QueryProperty] is off limits.
  • The backup method is to implement IQueryAttributable yourself. It is crucial that when assigning the values, if they are [ObservableProperty], you assign them to the Property (the capitalized one), not the Field (the lowercase one), otherwise change notification doesn't work.

Replies: 5 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@bijington
Comment options

@bijington
Comment options

Comment options

You must be logged in to vote
5 replies
@bijington
Comment options

@bijington
Comment options

@DonThompson
Comment options

@bijington
Comment options

@DonThompson
Comment options

Comment options

You must be logged in to vote
1 reply
@brminnick
Comment options

Answer selected by DonThompson
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants