Reputation: 230
If I declare a variable of a class that is not persistent in a VM; Do I need to initiate it and how? Pure declaration does not seem to do the trick. A create statement in the onShow statement in the navigation action to the page does not seem to do the trick either? Bug or am I misunderstanding something?
Upvotes: 1
Views: 38
Reputation: 2435
Guessing you have a variable that is typed as a class - and you need to init the variable by instansiating an object? Do this in onshow like in the image below:
Upvotes: 1
Reputation: 201
Sorry, but there's several confusing things in your question.
Are we talking about a transient class with attributes?
Variables in a viewmodel? Variables in a viewmodel are always transient (non-persistent).
Upvotes: 1