XAML Ancestor binding in MAUI

    0

    0

    Konrad Psiuk

    This code defines a TextBlock that binds the value of the DataContext.Client.Name property to the TextBlock. The DataContext.Client.Name property is of type System.String.

    <Button Text="-"
      Command="{Binding Source={RelativeSource Mode=FindAncestor, AncestorType={x:Type viewModels:ColdDrinksViewModel}}, Path=DecreseQuantity}"
      CommandParameter="{Binding .}" />
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.