-
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();
} |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
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.