Data Binding – x:Bind

Samples

  • <ToggleSwicth isOn=“{x:Bind Model.BoolPropINPC, Mode=TwoWay}“ />
  • <TextBlock Visibility=“{x:Bind Model.BoolPropINPC, Mode=OneWay}, Converter={StaticResource BoolToVisibilityConverter}“ />
  • <TextBlock Visibility=“{x:Bind Path=Grid1.Children[5].Visibility, Mode=OneWay}“ />
  • <TextBlock Text=“{x:Bind LocaltextBox.Text.Length, Mode=OneWay}“ />
  • <TextBlock Text=“{x:Bind Background.(SolidColorBrush.Color)“ />

Fallback Value (Leave Node is Null)

  • <TextBlock Text=“{x:Bind NullEmployee.FirstName, FallbackValue=’Name not available‘}“ />

Target Null Value

  • <TextBlock Text=“{x:Bind NullStringProperty, TargetNullValue=’Name not available‘}“ />