|
1 | | -<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> |
| 1 | +<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> |
2 | 2 | <Page x:Class="WrapPanel2Experiment.Samples.WrapPanel2BasicSample" |
3 | 3 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
4 | 4 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
10 | 10 |
|
11 | 11 | <Page.Resources> |
12 | 12 | <Style TargetType="Border"> |
13 | | - <Setter Property="Background" Value="#55000000"/> |
14 | | - <Setter Property="BorderBrush" Value="#88000000"/> |
15 | | - <Setter Property="CornerRadius" Value="8"/> |
16 | | - <Setter Property="BorderThickness" Value="1"/> |
17 | | - <Setter Property="Padding" Value="8"/> |
18 | | - <Setter Property="HorizontalAlignment" Value="Stretch"/> |
19 | | - <Setter Property="VerticalAlignment" Value="Stretch"/> |
| 13 | + <Setter Property="Background" Value="#55000000" /> |
| 14 | + <Setter Property="BorderBrush" Value="#88000000" /> |
| 15 | + <Setter Property="CornerRadius" Value="8" /> |
| 16 | + <Setter Property="BorderThickness" Value="1" /> |
| 17 | + <Setter Property="Padding" Value="8" /> |
| 18 | + <Setter Property="HorizontalAlignment" Value="Stretch" /> |
| 19 | + <Setter Property="VerticalAlignment" Value="Stretch" /> |
20 | 20 | </Style> |
21 | 21 | </Page.Resources> |
22 | 22 |
|
23 | | - <Grid Margin="16" MaxHeight="600"> |
24 | | - <controls:WrapPanel2 Orientation="{x:Bind local:WrapPanel2BasicSample.ConvertStringToOrientation(LayoutOrientation), Mode=OneWay}" |
25 | | - HorizontalSpacing="{x:Bind HorizontalSpacing, Mode=OneWay}" |
26 | | - VerticalSpacing="{x:Bind VerticalSpacing, Mode=OneWay}" |
27 | | - HorizontalAlignment="{x:Bind LayoutHorizontalAlignment, Mode=OneWay}" |
28 | | - VerticalAlignment="{x:Bind LayoutVerticalAlignment, Mode=OneWay}" |
29 | | - FixedRowLengths="{x:Bind FixedRowLengths, Mode=OneWay}" |
30 | | - ForcedStretchMethod="{x:Bind local:WrapPanel2BasicSample.ConvertStringToForcedStretchMethod(LayoutForcedStretchMethod), Mode=OneWay}" |
31 | | - OverflowBehavior="{x:Bind local:WrapPanel2BasicSample.ConvertStringToOverflowBehavior(LayoutOverflowBehavior), Mode=OneWay}"> |
32 | | - <Border controls:WrapPanel2.LayoutLength="2*" > |
33 | | - <TextBlock Text="2*" HorizontalAlignment="Center"/> |
| 23 | + <Grid MaxHeight="600" |
| 24 | + Margin="16"> |
| 25 | + <controls:WrapPanel2 HorizontalAlignment="{x:Bind LayoutHorizontalAlignment, Mode=OneWay}" |
| 26 | + VerticalAlignment="{x:Bind LayoutVerticalAlignment, Mode=OneWay}" |
| 27 | + FixedRowLengths="{x:Bind FixedRowLengths, Mode=OneWay}" |
| 28 | + ForcedStretchMethod="{x:Bind local:WrapPanel2BasicSample.ConvertStringToForcedStretchMethod(LayoutForcedStretchMethod), Mode=OneWay}" |
| 29 | + HorizontalSpacing="{x:Bind HorizontalSpacing, Mode=OneWay}" |
| 30 | + Orientation="{x:Bind local:WrapPanel2BasicSample.ConvertStringToOrientation(LayoutOrientation), Mode=OneWay}" |
| 31 | + OverflowBehavior="{x:Bind local:WrapPanel2BasicSample.ConvertStringToOverflowBehavior(LayoutOverflowBehavior), Mode=OneWay}" |
| 32 | + VerticalSpacing="{x:Bind VerticalSpacing, Mode=OneWay}"> |
| 33 | + <Border controls:WrapPanel2.LayoutLength="2*"> |
| 34 | + <TextBlock HorizontalAlignment="Center" |
| 35 | + Text="2*" /> |
34 | 36 | </Border> |
35 | | - <Border controls:WrapPanel2.LayoutLength="Auto" > |
36 | | - <TextBlock Text="Auto" HorizontalAlignment="Center"/> |
| 37 | + <Border controls:WrapPanel2.LayoutLength="Auto"> |
| 38 | + <TextBlock HorizontalAlignment="Center" |
| 39 | + Text="Auto" /> |
37 | 40 | </Border> |
38 | | - <Border controls:WrapPanel2.LayoutLength="400" > |
39 | | - <TextBlock Text="400px" HorizontalAlignment="Center"/> |
| 41 | + <Border controls:WrapPanel2.LayoutLength="400"> |
| 42 | + <TextBlock HorizontalAlignment="Center" |
| 43 | + Text="400px" /> |
40 | 44 | </Border> |
41 | | - <Border controls:WrapPanel2.LayoutLength="1*" > |
42 | | - <TextBlock Text="1*" HorizontalAlignment="Center"/> |
| 45 | + <Border controls:WrapPanel2.LayoutLength="1*"> |
| 46 | + <TextBlock HorizontalAlignment="Center" |
| 47 | + Text="1*" /> |
43 | 48 | </Border> |
44 | | - <Border controls:WrapPanel2.LayoutLength="200" > |
45 | | - <TextBlock Text="200px" HorizontalAlignment="Center"/> |
| 49 | + <Border controls:WrapPanel2.LayoutLength="200"> |
| 50 | + <TextBlock HorizontalAlignment="Center" |
| 51 | + Text="200px" /> |
46 | 52 | </Border> |
47 | | - <Border controls:WrapPanel2.LayoutLength="300" > |
48 | | - <TextBlock Text="300px" HorizontalAlignment="Center"/> |
| 53 | + <Border controls:WrapPanel2.LayoutLength="300"> |
| 54 | + <TextBlock HorizontalAlignment="Center" |
| 55 | + Text="300px" /> |
49 | 56 | </Border> |
50 | 57 | <Border controls:WrapPanel2.LayoutLength="600"> |
51 | | - <TextBlock Text="600px" HorizontalAlignment="Center"/> |
| 58 | + <TextBlock HorizontalAlignment="Center" |
| 59 | + Text="600px" /> |
52 | 60 | </Border> |
53 | 61 | <Border controls:WrapPanel2.LayoutLength="2*"> |
54 | | - <TextBlock Text="2*" HorizontalAlignment="Center"/> |
| 62 | + <TextBlock HorizontalAlignment="Center" |
| 63 | + Text="2*" /> |
55 | 64 | </Border> |
56 | 65 | <Border controls:WrapPanel2.LayoutLength="1.5*"> |
57 | | - <TextBlock Text="1.5*" HorizontalAlignment="Center"/> |
| 66 | + <TextBlock HorizontalAlignment="Center" |
| 67 | + Text="1.5*" /> |
58 | 68 | </Border> |
59 | 69 | <Border controls:WrapPanel2.LayoutLength="Auto"> |
60 | | - <TextBlock Text="Auto with longer text" HorizontalAlignment="Center"/> |
| 70 | + <TextBlock HorizontalAlignment="Center" |
| 71 | + Text="Auto with longer text" /> |
61 | 72 | </Border> |
62 | 73 | <Border controls:WrapPanel2.LayoutLength="400"> |
63 | | - <TextBlock Text="400px" HorizontalAlignment="Center"/> |
| 74 | + <TextBlock HorizontalAlignment="Center" |
| 75 | + Text="400px" /> |
64 | 76 | </Border> |
65 | 77 | <Border controls:WrapPanel2.LayoutLength="1*"> |
66 | | - <TextBlock Text="1*" HorizontalAlignment="Center"/> |
| 78 | + <TextBlock HorizontalAlignment="Center" |
| 79 | + Text="1*" /> |
67 | 80 | </Border> |
68 | 81 | </controls:WrapPanel2> |
69 | 82 | </Grid> |
|
0 commit comments