Forum Xamarin.Forms

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Disabled button style on Windows Phone

MI.5069MI.5069 USMember ✭✭

I'd like to change disabled button style on WindowsPhone, the solution below works on Android, but on WindowsPhone style is changed for a slight moment to desired and later is set to default (gray borders and transparent background). Am I doing something wrong or is it bug?

      <Style TargetType="Button">
        <Style.Triggers>
          <Trigger TargetType="Button" Property="IsEnabled" Value="False">
            <Setter Property="BackgroundColor" Value="Maroon"></Setter>
          </Trigger>
          <Trigger TargetType="Button" Property="IsEnabled" Value="True">
            <Setter Property="BackgroundColor" Value="Green"></Setter>
          </Trigger>
        </Style.Triggers>
      </Style>

Posts

Sign In or Register to comment.