Sunday, 11 August 2013

Binding Start/Stop text on Stopwatch.IsRunning - Property Changed

Binding Start/Stop text on Stopwatch.IsRunning - Property Changed

I have something like this in xaml:
<Button Content="{Binding MyStopwatch.IsRunning,Converter={StaticResource
BoolToStr}}"/>
I need to display Start, when IsRunning is false and Stop, when IsRunning
is true. I have no problem with converter or binding itself.
I have problem with refreshing IsRunning property. When IsRunning property
change while programm is running - it does not change Start/Stop text.
I know how to implement INotifyPropertyChange on my own properties. But I
dont know how to implement (something like) property change on IsRunning

No comments:

Post a Comment