This is a migrated thread and some comments may be shown as answers.

[Solved] Applying Styles to DocumentElements using a ResourceDictionary

1 Answer 123 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Shawn
Top achievements
Rank 1
Shawn asked on 04 Feb 2011, 01:46 AM
DcoumentElements (Span, Paragraphs, Sections) all seem to take a StyleDefinition, rather than a native Style object.

Is there any way to predefine styles (in a ResourceDictionary) and apply them programmatically to different DocumentElements at runtime?

Right now I am applying all the Style elements at runtime and the code is very ugly.

Any direction is much appreciated.

Thanks in Advance !

-Shawn

1 Answer, 1 is accepted

Sort by
0
Mike
Telerik team
answered on 09 Feb 2011, 02:52 PM
Hi Shawn,

StyleDefinition contains properties specific to the DocumentElements which are the building blocks of a document and these are not used directly as UIElements in the visual tree. This is why Style cannot be applied directly. Can you please describe a bit more your scenario and we will see if we can help you simplifying the solution.

Best wishes,
Mike
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
RichTextBox
Asked by
Shawn
Top achievements
Rank 1
Answers by
Mike
Telerik team
Share this question
or