Welcome back.
Now let's take a look at what we got right here.
So as I already said or mentioned in the last video, is that we got example representation of our current
well application or graphical user interface written below in the example window.
So if I just open it up a little bit more, you can see some key value pairs.
Well, this kind of looks a little bit like HTML right here.
We got a window tag and connect it to that window tag.
We can see that we have a couple of key value pairs.
So we have a key like let's say title and we have a value which is like main Window.
We have another key height with a value 450 and another key with the value 800 pixels.
For example, right now inside of that window tag, just like in HTML, we have a nested element, which
is the grid.
And again, inside of that grid, we could have some other elements.
So what we face right here is sort of a hierarchy.
So again, elements can have parents, children, they can be siblings, they can be well nested and
all of that.
Let's just create any kind of text.
So what you can see on the left side is the toolbox.
If you cannot find it here, you can simply go to view and then toolbox, or you can simply hit Ctrl,
alt X.
So Ctrl alt x will open up the toolbox on the left side.
Now let's open up the common WPF controls.
Let's simply take a label and let's drop it right into our WPF application.
Now I'm doing that because I want to show you that in the moment we create a new element like that label
right here.
Let me just zoom in a little bit.
You can see that here, right?
We got a new element created in our Xaml representation.
So inside of our grid right now, you can see a label tag.
So we created a label.
We have some new properties or key value pairs like for the content, which is the actual value of that.
We have an horizontal alignment, a margin and a vertical alignment and all of that.
So if we want to adjust the text, we could simply well change the value of the content from label to
Hello World, for example.
Now the reason why I show you that is that we can use C-sharp to well, adjust the values of all these
properties so we can just grab the label, go to the content property and adjust the string connected
right here.
So this is why it's very important to see the Xaml representation of your graphical user interface or
of your entire application right now.
Back in the days when we as developers have used Windows forms, we simply opened up the toolbox and
dragged all of those elements inside of our application.
Now in WPF, we make use of a grid system to keep it responsive, right?
Which is a little bit more modern and a dynamic way of building applications so you can simply drag
and drop elements.
But it's not really recommended.
And this is because we don't want to have those magic hardcoded positions and margins and all of that,
right?
It shows like 380, the margin on the left side.
Like we don't want to have that hardcoded.
We want to have it as responsive as possible.
All right.
So your one thing to take away right now is that if you create a new element, a graphical element in
your application, you will find it written down as a new element in your Xaml representation.
And every element that you create has properties which we can for sure adjust.