Skip to content

Commit 379769c

Browse files
committed
Added Markdown Docs for the StretchPanel
1 parent a76e62f commit 379769c

File tree

1 file changed

+37
-16
lines changed

1 file changed

+37
-16
lines changed
Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,53 @@
11
---
22
title: StretchPanel
3-
author: githubaccount
4-
description: TODO: Your experiment's description here
3+
author: Avid29
4+
description: A highly flexible panel that arranges its child elements according to GridLength definitions, allowing for proportional sizing and stretching behavior.
55
keywords: StretchPanel, Control, Layout
66
dev_langs:
77
- csharp
8-
category: Controls
9-
subcategory: Layout
8+
category: Layouts
9+
subcategory: Panel
1010
discussion-id: 0
1111
issue-id: 0
1212
icon: assets/icon.png
1313
---
1414

15-
<!-- To know about all the available Markdown syntax, Check out https://docs.microsoft.com/contribute/markdown-reference -->
16-
<!-- Ensure you remove all comments before submission, to ensure that there are no formatting issues when displaying this page. -->
17-
<!-- It is recommended to check how the Documentation will look in the sample app, before Merging a PR -->
18-
<!-- **Note:** All links to other docs.microsoft.com pages should be relative without locale, i.e. for the one above would be /contribute/markdown-reference -->
19-
<!-- Included images should be optimized for size and not include any Intellectual Property references. -->
20-
21-
<!-- Be sure to update the discussion/issue numbers above with your Labs discussion/issue id numbers in order for UI links to them from the sample app to work. -->
22-
2315
# StretchPanel
2416

25-
TODO: Fill in information about this experiment and how to get started here...
17+
The StretchPanel is a panel that arranges its child elements according to GridLength definitions.
2618

27-
## Custom Control
19+
When stretched along the main axis, the child elements with star-sized GridLength values will proportionally occupy the available space.
2820

29-
You can inherit from an existing component as well, like `Panel`, this example shows a control without a
30-
XAML Style that will be more light-weight to consume by an app developer:
21+
When not stretched along the main axis, star-sized child elements will be the smallest size possible while maintaining proportional sizing relative to each other and ensuring that all child elements are fully visible.
3122

3223
> [!Sample StretchPanelBasicSample]
24+
25+
## Properties
26+
27+
### Fixed Row Length
28+
29+
When `FixedRowLengths` is enabled, all rows/columns will to stretch to the size of the largest row/column in the panel. When this is not enabled, rows/columns will size to their content individually.
30+
31+
### Forced Stretch Method
32+
33+
The `ForcedStretchMethod` property allows you to specify how the StretchPanel should handle stretching in rows without star-sized definitions.
34+
35+
#### None
36+
37+
When set to `None`, the StretchPanel will not stretch rows/columns that do not have star-sized definitions. When the alignment is set to stretch, and even when fixed row lengths is enabled, the rows/columns without star-sized definitions will size to their content.
38+
39+
#### First
40+
41+
When set the `First`, the StretchPanel will stretch the first item in the row/column to occupy the remaining space when needed to comply with stretch alignment.
42+
43+
#### Last
44+
45+
When set to `Last`, the StretchPanel will stretch the last item in the row/column to occupy the remaining space when needed to comply with stretch alignment.
46+
47+
#### Equal
48+
49+
When set to `Equal`, the StretchPanel will stretch all items in the row/column to occupy the equal space throughout the row when needed to comply with stretch alignment.
50+
51+
#### Proportional
52+
53+
When set to `Proportional`, the StretchPanel will stretch all items in the row/column proportionally to their defined size to occupy the remaining space when needed to comply with stretch alignment.

0 commit comments

Comments
 (0)