Skip to content

Commit b4fe600

Browse files
Added another sample to the app, but it's a bit wonky still...
Image isn't DPI aware, so it's a bit weird at different DPI monitor.
1 parent 8ee8084 commit b4fe600

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed
Binary file not shown.
161 Bytes
Loading
-1.07 KB
Binary file not shown.

Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@
130130
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
131131
<Content Include="Assets\BrushAssets\TileTexture.png" />
132132
<Content Include="Assets\BrushAssets\NoiseTexture.png" />
133+
<Content Include="Assets\checker.png" />
133134
<Content Include="Assets\Llama.mp3" />
134135
<Content Include="Assets\mslogo.png" />
135136
<Content Include="Assets\NotificationAssets\Cloudy-Square.png" />

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Primitives/ConstrainedBox.bind

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,20 @@
44
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
66
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
7+
xmlns:brushes="using:Microsoft.Toolkit.Uwp.UI.Media"
78
mc:Ignorable="d">
89

910
<Grid>
1011
<controls:ConstrainedBox AspectRatio="16:3" VerticalAlignment="Top">
1112
<Image Source="/Assets/Photos/WestSeattleView.jpg" Stretch="UniformToFill"/>
1213
</controls:ConstrainedBox>
14+
<controls:ConstrainedBox MultipleX="64"
15+
AspectRatio="1:1"
16+
MinWidth="64" MaxWidth="512">
17+
<controls:ConstrainedBox.Background>
18+
<!-- TODO: Should I make a DPI aware image? As otherwise scaling doesn't quite work at 150%? -->
19+
<brushes:TilesBrush TextureUri="ms-appx:///Assets/checker.png"/>
20+
</controls:ConstrainedBox.Background>
21+
</controls:ConstrainedBox>
1322
</Grid>
1423
</Page>

0 commit comments

Comments
 (0)