I am writing a class that converts an HTML document to a Paragrpah list that can be used with RichTextBlock in Windows 8 applications. I want to give the class a list of styles defined in XAML, and the class will read the useful properties from the style and apply them.
If I have Windows.UI.XAML.Style style , how can I read a property from it? I tried
var fontWeight = style.GetValue(TextElement.FontWeightProperty)
for a style defined in XAML with TargetProperty = "TextBlock", but this fails and an exception
source share