Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Is there a way to add binding in Value section of data Trigger

stXamDevstXamDev Member ✭✭✭
edited April 2019 in Xamarin.Forms

Best Answer


  • TaylorDTaylorD USMember ✭✭✭

    Here is the code from the post formatted properly.

    <DataTrigger TargetType="StackLayout" Binding="{Binding IsRAFlagVisible}" Value="{Binding MyVariable}">
        <Setter Property="BackgroundColor" Value="DarkGray"/>
  • LandLuLandLu Member, Xamarin Team Xamurai

    Is this what you are looking for
    It specifies how to use binding in data trigger.

  • stXamDevstXamDev Member ✭✭✭

    @TaylorD Thanks
    @LandLu In the code I need to bind the Value field from the code and not as a static value

Sign In or Register to comment.