In my project I want to display a small logo on the side of a custom control. Since I have no canvas I thought maybe a Visual Brush would be a good Idea to place the logo in the background.
<VisualBrush> <VisualBrush.Visual> <Rectangle Width="200" Height="200" Fill="Red" /> </VisualBrush.Visual> </VisualBrush>
But the Rectangle I am using right now is not 200×200. It takes the complete available space. Thats not what I want. I also tried a Viewbox and set the stretch property but the result is the same because in the end I don't need a simple Rectangle but a canvas with many path objects as children. A Viewbox supports only one child.
This there any way to get around this problem?
You need to set
AlignmentYproperties on your