What is the Silverlight 3.0 equivalent for BasedOn="{StaticResource {x:Type TextBlock}}"
c#, silverlight, silverlight-3.0, wpf
Solution
There isn't an equivalent to that particular usage in Silverlight. Silverlight only supports string keys for accessing Resources. Hence the use of `{x:Type SomeType}` as a key doesn't work.
In Silverlight you need to make a complete copy of the controls style. You can do this either by using Blend which has tools for doing this or by copy'n'pasting it from the Silverlight documentation. Control Styles and Templates
Of course once you have a copy of the initial style you can then either modify your copy or create other Styles assigning this copy to BasedOn to create a set of variations.
Problem
I am trying to extend a base style for a TextBlock. Simple think in WPF world, should be the same in Silverlight. But I get a error on x:Type. How can I translate BasedOn="{StaticResource {x:Type TextBlock}}" in Silverlight. Anyone out there who achieved this ? Thank you.