locked
Expression Blend and Windows Phone Check box behavior RRS feed

  • Question

  • I am designing a phone app that needs to display disabled check boxes.  If I change the foreground color to red (for example) then run the Windows phone emulator, the text reverts back to the original grey in both my design surface and on my emulator.  Is there a way to override this property so I can have red text on a disabled check box? 
    This posting is provided "AS IS" with no warranties, and confers no rights
    Friday, January 7, 2011 10:34 PM

All replies

  • You could use Trigger when IsEnabled as False on style of CheckBox:

    <Style TargetType="CheckBox">
      <Style.Triggers>
        <Trigger Property="IsEnabled" Value="False">
          <Setter Property="Foreground" Value="Red" />
        </Trigger>
      </Style.Triggers>
    </Style>
    

    Manoj Mandal
    Saturday, January 8, 2011 6:29 PM
  • Edit the style for the checkbox, select the visual states panel, and edit the disabled state.
    Monday, January 10, 2011 3:00 PM
    Moderator