0

I have a TextBox in a Stackpanel, as in the code below

<StackPanel x:Name="EtenStack" Visibility="{Binding Path=Sort, ConverterParameter=Eten, Converter={StaticResource convertEten}}"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> <Label Content="Bereidingstijd"/> <TextBox Height="23" Width="150" Text="{Binding Path=Time, TargetNullValue='', Mode=TwoWay}"/> </StackPanel> 

When the Visibility is set to Visible in my converter, my textbox doesn't update it's Text property, even though the Property gets it's correct value (tested by showing a MessageBox with the Property).

Any thoughts?

1
  • Do you call the notifypropertychanged event for visible? Commented Jun 1, 2011 at 9:54

1 Answer 1

1

The Time property will need to be either a Dependency Property with the right binding or on a class that Implements the INotifyPropertyChanged Interface, for the Time property, in order for the update to occur "Automatically."

Sign up to request clarification or add additional context in comments.

1 Comment

Time was a Dependency Property, I changed it to a regular property and implemented INotifyPropertyChanged and hurrah, it worked! Thanks @Jodrell

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.