How to set ViewBox background?

2019-02-17 10:21发布

I need to set the background of my System.Windows.Controls.Viewbox, but the property is missing.

How can I fix this problem?

2条回答
smile是对你的礼貌
2楼-- · 2019-02-17 11:09

Put it in a Border and set its Background.

查看更多
We Are One
3楼-- · 2019-02-17 11:12

Put your viewbox inside a control that supports the background property:

<Border Background="Red">
   <ViewBox />
</Border>
查看更多
登录 后发表回答