Xamarin binding default value in xaml

Viewed 4076

I would to set my IsVisible property of an object in Xaml by default at false. But when I open the page, it is visible, then the binding variable is evaluated, and if it is false, becomes invisible. I want that it is not visible by default, and the if the binding variable is true, it should become visible. I've tried to insert a default value in my binding for IsVisible property of my object. I've tried FallbackValue = Hidden or FallbackValue = Collapsed and more, even for TargetNullValue, but it doesn't works. I obtain always a XamlParseException.

Can anyone help me please? Thanks.

Code (simplified):

 <Grid HorizontalOptions="FillAndExpand"
       IsVisible="{Binding Path=Info.IsVisible, Converter={StaticResource BooleanToStringConverter}, FallbackValue=Collapsed}"
1 Answers
Related