Repository navigation
|
Hello mauiers, Something like: [QueryProperty(nameof(Item1), "item1")]
[QueryProperty(nameof(Item2), "item2")]
[QueryInitialized(nameof(MyMethod))]
public class MyModel
{
public string? Item1 { get; set; }
public string? Item2 { get; set; }
private void MyMethod()
{
//The object knows that Item1 and Item2 have been initialized.
}
}What do you think ? The current workaround is to forward protected override void OnParentSet()
{
base.OnParentSet();
((MyModel)BindingContext).MyMethod();
} |
Answered by
Jared-Aus
Feb 28, 2022
Replies: 1 comment 1 reply
|
I'm not a fan of shell navigation due to complexities like these, but I think in your case IQueryAttributable might be a reasonable substitute. It won't solve the likely problem of your view model being in a useless/empty state when the page is first presented however. |
1 reply
Answer selected by
softlion
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not a fan of shell navigation due to complexities like these, but I think in your case IQueryAttributable might be a reasonable substitute. It won't solve the likely problem of your view model being in a useless/empty state when the page is first presented however.