windows-phone-7resourcedictionarysystemcolors

WP7: Windows Phone 7: Is there a resource of the color/brush of the keys of the SIP?


I need to create my own Soft Input Panel as none of the input scopes meet my requirements. I can use PhoneChromeBrush as a resource for the background of the panel, but I am not able to find any resource for the color of the keys. I am talking of the keys of either the soft keyboard, soft dial pad etc. In the light theme they are plain white, but in the dark theme not.

Is there a resource I can use? Or is it just a semitransparent white overlaying? What would be the percentage of the transparency? And would it be overlaying PhoneBackgroundBrush or PhoneChromeBrush? Or does anyone know the HEX code of that color? #3A3A3A seems quite close, but still wrong.

Thanks for any ideas.


Solution

  • Well, thanks to KooKiz, who got me on the right track, I would like to answer my own question.

    This might be considered a work-a-round, but it satisfied me.

    1. It seems there is no resource for this color.

    2. Even the colors of the keys seem to have the same color in different SIPs, they are actually not. Keyboard, dial pad and even date-/timepicker use different colors.

    3. As my soft input panel should match with the dial pad the HEX code of the color would be #FF383838 in dark theme and #FFFFFFFF in light theme.

    4. I am using PhoneBackgroundBrush covered by a semitransparent white (#38FFFFFF) to get my color. In this way in dark theme I will cover #FF000000 with #38FFFFFF resulting in a #FF383838; in the light theme it will cover #FFFFFFFF with #38FFFFFF and the result will be #FFFFFFFF. So this will give me the proper color for my keys, no matter what theme the user is using.

    Here an example:

    <Grid Background="{StaticResource PhoneBackgroundBrush}" Margin="3" >
        <Grid Background="#38FFFFFF" Margin="0" >
            <TextBlock Text="1" Style="{StaticResource PhoneTextNormalStyle}" />
        </Grid>
    </Grid>