Replies: 1 comment 1 reply
-
You can override the base viewmodel instance creation. Docs. public class CounterView : CanvasView<CounterViewModel>
{
// Override the base viewmodel instance creation.
// Required in case the viewmodel doesn't have a parameterless constructor.
protected override CounterViewModel GetBindingContext()
{
return new CounterViewModel(69);
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to set initial parameter for the viewmodel that is made for a character status.
but it looks like I can't feed my own viewmodel to a CanvasView as it requests the viewmodel when awake.
I'm new to mvvm so teach me how to. thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions