Paints an area with a Visual.
public ref class VisualBrush sealed : System::Windows::Media::TileBrush
public sealed class VisualBrush : System.Windows.Media.TileBrush
type VisualBrush = class inherit TileBrush
Public NotInheritable Class VisualBrush Inherits TileBrush
When you define a new Visual for a VisualBrush and that Visual is a UIElement (such as a panel or control), the layout system runs on the UIElement and its child elements when the AutoLayoutContent property is set to
true. However, the root UIElement is essentially isolated from the rest of the system; styles, storyboards, and external layout can't permeate this boundary. Therefore, you should explicitly specify the size of the root UIElement, because its only parent is the VisualBrush and therefore it cannot automatically size itself to the area being painted. For more information about layout in Windows Presentation Foundation (WPF), see the Layout.
Updates to the visual tree of a VisualBrush will not propagate if a BitmapEffect is in the brush's parent chain. You can workaround this limitation by forcing an update of the scene on the object above the effect. You can call InvalidateVisual or include an animation to force a scene update.
Freezable Features: Because it inherits from the Freezable class, the VisualBrush class provides several special features: VisualBrush objects can be declared as and shared among multiple objects. For more information about the different features provided by Freezable objects, see the Freezable Objects Overview.
|VisualBrush() VisualBrush() VisualBrush() VisualBrush()||
Initializes a new instance of the VisualBrush class.
|VisualBrush(Visual) VisualBrush(Visual) VisualBrush(Visual) VisualBrush(Visual)|
|AutoLayoutContentProperty AutoLayoutContentProperty AutoLayoutContentProperty AutoLayoutContentProperty||
Identifies the AutoLayoutContent dependency property.
|VisualProperty VisualProperty VisualProperty VisualProperty||
Identifies the Visual dependency property.
|AlignmentX AlignmentX AlignmentX AlignmentX||
Gets or sets the horizontal alignment of content in the TileBrush base tile.(Inherited from TileBrush)
|AlignmentY AlignmentY AlignmentY AlignmentY||
Gets or sets the vertical alignment of content in the TileBrush base tile.(Inherited from TileBrush)
|AutoLayoutContent AutoLayoutContent AutoLayoutContent AutoLayoutContent|
|CanFreeze CanFreeze CanFreeze CanFreeze||
Gets a value that indicates whether the object can be made unmodifiable.(Inherited from Freezable)
|DependencyObjectType DependencyObjectType DependencyObjectType DependencyObjectType||
Gets the DependencyObjectType that wraps the CLR type of this instance.(Inherited from DependencyObject)
|Dispatcher Dispatcher Dispatcher Dispatcher||DispatcherObject)|
|HasAnimatedProperties HasAnimatedProperties HasAnimatedProperties HasAnimatedProperties||
Gets a value that indicates whether one or more AnimationClock objects is associated with any of this object's dependency properties.(Inherited from Animatable)
|IsFrozen IsFrozen IsFrozen IsFrozen||
Gets a value that indicates whether the object is currently modifiable.(Inherited from Freezable)
|IsSealed IsSealed IsSealed IsSealed||
Gets a value that indicates whether this instance is currently sealed (read-only).(Inherited from DependencyObject)
|Opacity Opacity Opacity Opacity||
Gets or sets the degree of opacity of a Brush.(Inherited from Brush)
|RelativeTransform RelativeTransform RelativeTransform RelativeTransform||
Gets or sets the transformation that is applied to the brush using relative coordinates.(Inherited from Brush)
|Stretch Stretch Stretch Stretch||
Gets or sets a value that specifies how the content of this TileBrush stretches to fit its tiles.(Inherited from TileBrush)
|TileMode TileMode TileMode TileMode||
Gets or sets a value that specifies how a TileBrush fills the area that you are painting if the base tile is smaller than the output area.(Inherited from TileBrush)
|Transform Transform Transform Transform||
Gets or sets the transformation that is applied to the brush. This transformation is applied after the brush's output has been mapped and positioned.(Inherited from Brush)
|Viewbox Viewbox Viewbox Viewbox||
Gets or sets the position and dimensions of the content in a TileBrush tile.(Inherited from TileBrush)
|ViewboxUnits ViewboxUnits ViewboxUnits ViewboxUnits||TileBrush)|
|Viewport Viewport Viewport Viewport||
Gets or sets the position and dimensions of the base tile for a TileBrush.(Inherited from TileBrush)
|ViewportUnits ViewportUnits ViewportUnits ViewportUnits||
Gets or sets a BrushMappingMode enumeration that specifies whether the value of the Viewport, which indicates the size and position of the TileBrush base tile, is relative to the size of the output area.(Inherited from TileBrush)
|Visual Visual Visual Visual||
Gets or sets the brush's content.
|Changed Changed Changed Changed||
Occurs when the Freezable or an object it contains is modified.(Inherited from Freezable)
Explicit Interface Implementations
|IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider)||
Formats the value of the current instance using the specified format.(Inherited from Brush)
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.