I know in XAML we can do…
<TextBlock FontSize="18">
This is my text <LineBreak/>
<Run FontSize="24" FontWeight="Bold">My big bold text</Run>
</TextBlock>
Question is, how can I assign a Run into a text (string) property, programmatically?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you look at
TextBlockyou will see that ContentProperty is set toInlinesThis means that you will add
Inlineelements to the propertyInlinesfor everyting added between the opening and closing tag ofTextBlock.So the c# equivalent to your Xaml is