Applying a VisualBrush
The VisualBrush
enables filling an object with the content of another visual element in the user interface. For example, you could set a button’s background with the content of a MediaElement
that is playing a video. Applying a VisualBrush
is simple, in that you just need to assign its Visual
property with the name of the visual element you want to bind. The following code example shows how you can assign another visual element currently in the user interface as the background of a button:
The requirement is that the source visual element has a Name
property set. You assign the visual element with the Binding
markup extension, ...
Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.