[UWP]如何为UWP Panel实现NineGrid背景图像 [英] [UWP]How to achieve a NineGrid background image for UWP Panel
问题描述
我发现一个解决方案是直接在$ b内使用< Image>
$ b <网格>
。
将背景图片添加到方式>面板
是
< Grid.Background>
< ImageBrush ImageSource =" /Assets/Background.jpg"
Stretch =" UniformToFill" />
< /Grid.Background>
但是我还没有找到如何制作 ImageBrush
利用
。
NineGrid
第一种方法是正确的方法吗?
你好 LiuShiAM,
我已经回复了你的主题 此处 , 图片 控制
有 NineGrid 属性,
但是 ImageBrush 没有.T 他最简单的方法是
将Image控件放在底层作为第一种方法。
<网格x:名称=" LayoutRoot">
< Image Source =" Assets / image.jpg" Stretch =" UniformToFill" NineGrid =" 50" />
<! - 将你的xaml控件放在这里 - >
< / Grid>祝你好运,
微风
One solution I found is to use an <Image>
directly inside a
<Grid>
.
Another way to add background image to Panel
is
<Grid.Background>
<ImageBrush ImageSource="/Assets/Background.jpg"
Stretch="UniformToFill" />
</Grid.Background>
However I haven't found how to make the ImageBrush
utilize
NineGrid
.
Is the first method the right way to go?
Hello LiuShiAM,
I have replied your thread here, The Image control has a NineGrid property, but the ImageBrush doesn't. The simplest way is
putting the Image control on the bottom layer as your first method.
<Grid x:Name="LayoutRoot"> <Image Source="Assets/image.jpg" Stretch="UniformToFill" NineGrid="50"/> <!--Put your xaml control here--> </Grid>Best regards,
Breeze
这篇关于[UWP]如何为UWP Panel实现NineGrid背景图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!