VisualBrush
-
Hello i trying to draw a raster on a rectangle. Im using the VisualBrush as the VisualBrush.Visual um using a TextBox (onely for testing) I setted the TileMode to tile, and the ViewPort. All is working fine. But when i scale the ractangle, the VisualBrush.Visual also gets scaled. How can i fix this? here is my code:
<Rectangle Stroke="#FF000000" Margin="80,136,224,46"> <Rectangle.Fill> <VisualBrush TileMode="FlipX" Viewport="0,0,0.1,0.1" Stretch="Uniform"> <VisualBrush.Visual> <TextBox Text="test"/> </VisualBrush.Visual> </VisualBrush> </Rectangle.Fill> </Rectangle>
sorry for my bad english! i hope you understand my problem
-
Hello i trying to draw a raster on a rectangle. Im using the VisualBrush as the VisualBrush.Visual um using a TextBox (onely for testing) I setted the TileMode to tile, and the ViewPort. All is working fine. But when i scale the ractangle, the VisualBrush.Visual also gets scaled. How can i fix this? here is my code:
<Rectangle Stroke="#FF000000" Margin="80,136,224,46"> <Rectangle.Fill> <VisualBrush TileMode="FlipX" Viewport="0,0,0.1,0.1" Stretch="Uniform"> <VisualBrush.Visual> <TextBox Text="test"/> </VisualBrush.Visual> </VisualBrush> </Rectangle.Fill> </Rectangle>
sorry for my bad english! i hope you understand my problem
Try <VisualBrush TileMode="FlipX" Viewport="0,0,20,20"
ViewportUnits="Absolute"
Stretch="Uniform">Mark Salsbery Microsoft MVP - Visual C++ :java: