Silverlight - Fill a Rectangle (or other controls which have a Brush Property) with a custom UserControl -


I have to fill a rectangle with custom user control. Rectangular Filling property accepts a brush and there is no equivalent for visuallabs in Silverlight.

I have found this post - - With this possible solution, this approach requires user control (which will be used to fill the rectangle), to render the rectangle first so that the visualization Could convert it into a right-bitmap image.

Do anyone know any alternative solutions? I prefer not to render user control outside the rectangle and delete it later, because there is a possibility of some flicker.

Thanks and best wishes, Bruno

If any rectangle and brush to fill it It is necessary to use so there is no alternative solution.

Do you carry it already because there is a reason not to use a boundary directly to UserControl ? If you do not want to use the usercontrol to react with the mouse, then you can fill in your UserControl and with a transparent border in a grid Rectangle .

Comments