Search code examples
c#wpfbackgroundviewbox

How to set ViewBox background?


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

How can I fix this problem?


Solution

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

    <Border Background="Red">
       <ViewBox />
    </Border>