From the course: Windows Presentation Foundation 5: Interaction and Controls
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Use the Shape Stretch property
From the course: Windows Presentation Foundation 5: Interaction and Controls
Use the Shape Stretch property
- [Instructor] The shape class has a property called stretch which we'll examine in this video. First stop is to look at the UI that I created for this demo. I have a grid and in this top row of the grid are four ellipses and in the bottom row are four more ellipses. Let's start by looking at this first ellipse, which has some properties that are shared by all the ellipses. So let's look at this in the zanal. This ellipse has no width and no height properties, so that means it defaults to auto. And it has the horizontal and the vertical alignment properties are not set either, which means they default to stretch. So what does that mean? I haven't specified any width at all, but I have given the container permission to stretch it as necessary by changing the alignment properties. So, normally, it would stretch it to fill the container which in the case is a grid cell. Now we'll look at the stretch property, which is a property on the shape class itself. So just to be clear, horizontal…
Contents
-
-
-
-
-
-
-
Overview2m 50s
-
Use the Shape Stretch property3m 34s
-
Set the Fill and Stroke brushes6m 25s
-
Work with the line shape3m 33s
-
Work with Polyline and Polygon6m 45s
-
Use the StrokeDashArray and EndCap properties4m 52s
-
Create drawings with Path5m 49s
-
Use Blend for Visual Studio to draw a Path5m 24s
-
Hit testing with geometries4m 2s
-
-
-
-
-
-
-
-