How to Create an Implicit Style in Windows Phone 8 ?

Published on December 8, 2013 by abundantcode

Filed under Windows Phone

Last modified December 8, 2013

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 4314 times

In one of the previous article , we demonstrated how to create an explicit style in Windows Phone 8 for TextBlock . In this article , we will explore how one can create an implicit style in Windows Phone 8.

How to Create an Implicit Style in Windows Phone 8 ?

To create an Implicit style , the steps are pretty simple , don’t specify the x:Key property in the style when defining them. Specify only the Target Type as shown below.

<Application.Resources>
<Style TargetType="TextBlock">
   <Setter Property="FontSize" Value="8" />
</Style>
</Application.Resources>

Now , when you create a text block on the screen , you dont have to specify the style for the textblock , it will automatically pick the one from the one defined in the App.xaml file.

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

1 Comment

  1. Donald

    Shouldn’t there be a ResourceDictionary tag in there?

    February 7, 2014 - 8:29 am – Reply

Leave a Comment


x

You might be Interested in these Posts

How to delete user account from command line in Windows 10 ?

You can delete a user account from command line in Windows 10 using the net user command and specify...

How to add new user account from command line in Windows 10 ?

You can add a new user account in Windows 10 using command prompt using the net user command and pas...

How to open display settings from command line in Windows 10 ?

The display properties can be found in the settings app in Windows 10 which lets the users to config...