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.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
Syntax
声明
Public Overridable Function GetTextBrushId ( _
    view As DiagramClientView, _
    parentShape As ShapeElement _
) As StyleSetResourceId
public virtual StyleSetResourceId GetTextBrushId(
    DiagramClientView view,
    ShapeElement parentShape
)
public:
virtual StyleSetResourceId^ GetTextBrushId(
    DiagramClientView^ view, 
    ShapeElement^ parentShape
)
abstract GetTextBrushId : 
        view:DiagramClientView * 
        parentShape:ShapeElement -> StyleSetResourceId 
override GetTextBrushId : 
        view:DiagramClientView * 
        parentShape:ShapeElement -> StyleSetResourceId 
public function GetTextBrushId(
    view : DiagramClientView, 
    parentShape : ShapeElement
) : StyleSetResourceId
Parameters
- parentShape
 Type: Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement
 The ShapeElement on which to draw.
Return Value
Type: Microsoft.VisualStudio.Modeling.Diagrams.StyleSetResourceId
Remarks
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;
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.