Matthias Shapiro

I need fewer hobbies

Windows 8 Style CheckBox/RadioButton in Windows Phone

I love the “checked” style in Windows 8.

image

Clean, slick, I just like the style. So I implemented it in Windows Phone as a style. The color in the style matches the phone theme, so it’s pretty flexible .

image

To get this style in your app, follow these steps.

1) Download the resource file that has these styles.

2) Open your project in Blend. (Yeah, you could open Visual Studio, but I’ll show you why you shouldn’t.)

3) Right-click on Resources folder (or whatever folder you want to add your resources) and click “Add Existing Item…”

image

4) Select the Win8_CheckBo_Radio_Styles.xaml file.

If you did this in Blend, you may notice that your App.xaml has changed. Blend has added the following code to incorporate this new ResourceDictionary into your project and make these styles available to all pages:

<ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="Resources/Win8_CheckBox_Radio_Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>

Visual Studio totally did not. So (if you’re doing this in Visual Studio) you’ll need to add those lines yourself.

5) Now you can go to your Checkbox, right-click on it and select Edit Template –> Apply Resource –> ImageCheckBox

image

6) For your RadioButton, right-click and select Edit Template –> Apply Resource –> ImageRadioButton

image

And you should have your custom style applied. Need to update it? Right-click –> Edit Template –> Edit Current and you can jump right into the control to edit it

8 Responses to Windows 8 Style CheckBox/RadioButton in Windows Phone

  1. Pingback: How to Temporarily Highlight the Background of a Button when Selected | Zampieri Answers

  2. How do associate the checkbox or radiobutton with the style applied with the Image where you want it to appear?

  3. How do you associate the checkbox or radiobutton with the style applied with an Image or a HubTile to get this effect.

  4. gzoeivj oyvberh yfuapk famtyh mywxiam qbdfuww vilfzcp

  5. matthiasshapiro

    Oops! Fixed.

  6. Pingback: Dew Drop – December 14, 2012 (#1,463) | Alvin Ashcraft's Morning Dew

  7. Peter

    Looks awesome, but I’m guessing you intended to include the download link to that resource file as well?

  8. Pingback: Windows Store Developer Links – 2012-12-14 | Dan Rigby