From the course: XAML Fundamentals: Building Powerful UIs for Cross-Platform Applications
Unlock this course with a free trial
Join today to access over 25,600 courses taught by industry experts.
TextBlock and InLine content - XAML Tutorial
From the course: XAML Fundamentals: Building Powerful UIs for Cross-Platform Applications
TextBlock and InLine content
- [Narrator] Before looking at the example code, let's look at another setting in Visual Studio you might find useful. I always switch to the vertical split mode in my examples. I can make that to default by going to tools, options, and then in the XAML Designer, going to this dropdown and choosing vertical. Now let's talk about the text block. It's a read only text on the screen and it supports simple text, which you get by setting the text property. So this supports strings, but if you put anything in between the beginning and ending tags, that is what's called inlines. And inlines just allows us to put other items besides text in there. Example, there's a bold element here, that's wrapping around this item and you can see over here that's showing up in bold. Here I am putting in what's called a run. It's a way of designating a section of text. This is like a div tag in html. And then inside the run I have different…
Contents
-
-
-
-
-
-
-
What does content mean in XAML?6m 9s
-
(Locked)
TextBlock and InLine content1m 55s
-
(Locked)
Layout panels2m 11s
-
(Locked)
Complex content within a ContentControl4m 6s
-
(Locked)
Non-UI types in ContentControl1m 55s
-
(Locked)
Show lists of elements with ItemsControls2m 27s
-
(Locked)
Fill a list using Binding2m 41s
-
(Locked)
Make an item selectable with a ListBoxItem1m 57s
-
(Locked)
Wrap content with a decorator2m 11s
-
-
-
-
-
-
-
-