TextField::GetTextBrushId Method (DiagramClientView^, ShapeElement^)

 

Gets the id of the brush to draw the text with for the specified ShapeElement instance.

Namespace:   Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)

public:
virtual StyleSetResourceId^ GetTextBrushId(
	DiagramClientView^ view,
	ShapeElement^ parentShape
)

By default, this method returns the default text brush id. To dynamically change the text brush for this ShapeField, override this method.

public virtual StyleSetResourceId GetTextBrushId(DiagramClientView view, ShapeElement parentShape)
{
if (this.HasSelectedAppearance(parentShape, view))
{
return view.Focused ? this.DefaultSelectedTextBrushId : this.DefaultInactiveSelectedTextBrushId;
}
return DefaultTextBrushId;
}

Return to top
Show: