-
I have a custom control based on Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
Not sure I understand the problem. But I assume you could use a canvas for this? |
Beta Was this translation helpful? Give feedback.
-
You can add a Control as a child that takes the size of your ContentControl and places itself above it with ZIndex = 1, and use Render(DrawingContext context) to draw. |
Beta Was this translation helpful? Give feedback.
-
Edit : My solution below is bad because the drawing is ultimately well below the content, as verified by BAndysc. Even if there is already an accepted solution, I allow myself to give what I tested to be sure, even if the accepted solution is more versatile. It depends on the need and it might be useful to someone. In fact, the ContentControl already draws on top of its content:
|
Beta Was this translation helpful? Give feedback.
-
Indeed, I was wrong because I had a gray button which ultimately has great transparency. Oops... :-) |
Beta Was this translation helpful? Give feedback.
Example code:
and resources: