Forum Discussion
prasannak
14 years agoOccasional Contributor
I can post more information here than the stackoverflow comment. :)
Thanks for a clear explanation. I undestand that I am accessing a value from a different instance which will initalize its own value. I just couldn't find a way to access the instance that is created by the test. What you have suggested would work.However, since it's wpf, the binding creates the instance of incr1.
The button is bound to a backing command
<Grid>
<Button Content="Increment" Command="{Binding IncrCommand}"/>
<Label Content="{Binding Increment}"/>
</Grid>.
The Incement method just wraps the binding Increment property and returns the value. I don't explicitly create the instance here. I have attached the project zip here for reference.
Thanks for a clear explanation. I undestand that I am accessing a value from a different instance which will initalize its own value. I just couldn't find a way to access the instance that is created by the test. What you have suggested would work.However, since it's wpf, the binding creates the instance of incr1.
The button is bound to a backing command
<Grid>
<Button Content="Increment" Command="{Binding IncrCommand}"/>
<Label Content="{Binding Increment}"/>
</Grid>.
The Incement method just wraps the binding Increment property and returns the value. I don't explicitly create the instance here. I have attached the project zip here for reference.