I Have a TextBlock on Silverlight Page.
XAML
<TextBlock Text="*" x:Name="HasChangesTextBlock" Foreground="Red" FontSize="14" Visibility="{Binding Path=HasChanges, Converter={StaticResource BooleanToVisibilityConverter}}"
Margin="5,0,0,0">
</TextBlock>
Page loading takes few moments. And before binding is applied I want TextBlock to be collapsed, but default value of Visibility Property is Visible.
Is there way to make TextBlock to be collapsed before binding is applied?
I found the solution.
we should just add FallbackValue=Collapsed to the binding expression
That is a breaking change that was introduced in Silverlight 4.
XAML
<TextBlock Text="*" x:Name="HasPlayListChangesTextBlock" Foreground="Red" FontSize="14"
Visibility="{Binding Path=HasChanges, Converter={StaticResource BooleanToVisibilityConverter},FallbackValue=Collapsed}">
</TextBlock>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With