IntraTextAdornmentTag Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
IntraTextAdornmentTag(UIElement, AdornmentRemovedCallback) |
Initializes a new instance of a IntraTextAdornmentTag. |
IntraTextAdornmentTag(UIElement, AdornmentRemovedCallback, Nullable<PositionAffinity>) |
Initializes a new instance of a IntraTextAdornmentTag. |
IntraTextAdornmentTag(UIElement, AdornmentRemovedCallback, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<PositionAffinity>) |
Initializes a new instance of a IntraTextAdornmentTag. |
IntraTextAdornmentTag(UIElement, AdornmentRemovedCallback)
Initializes a new instance of a IntraTextAdornmentTag.
public:
IntraTextAdornmentTag(System::Windows::UIElement ^ adornment, Microsoft::VisualStudio::Text::Editor::AdornmentRemovedCallback ^ removalCallback);
public IntraTextAdornmentTag (System.Windows.UIElement adornment, Microsoft.VisualStudio.Text.Editor.AdornmentRemovedCallback removalCallback);
new Microsoft.VisualStudio.Text.Editor.IntraTextAdornmentTag : System.Windows.UIElement * Microsoft.VisualStudio.Text.Editor.AdornmentRemovedCallback -> Microsoft.VisualStudio.Text.Editor.IntraTextAdornmentTag
Public Sub New (adornment As UIElement, removalCallback As AdornmentRemovedCallback)
Parameters
- adornment
- UIElement
The adornment to be displayed at tag's position. Must not be null.
- removalCallback
- AdornmentRemovedCallback
Called when adornment is removed from the view. May be null.
Remarks
This constructor should only be used for adornments that replace text in the view's text buffer.
Applies to
IntraTextAdornmentTag(UIElement, AdornmentRemovedCallback, Nullable<PositionAffinity>)
Initializes a new instance of a IntraTextAdornmentTag.
public:
IntraTextAdornmentTag(System::Windows::UIElement ^ adornment, Microsoft::VisualStudio::Text::Editor::AdornmentRemovedCallback ^ removalCallback, Nullable<Microsoft::VisualStudio::Text::PositionAffinity> affinity);
public IntraTextAdornmentTag (System.Windows.UIElement adornment, Microsoft.VisualStudio.Text.Editor.AdornmentRemovedCallback removalCallback, Microsoft.VisualStudio.Text.PositionAffinity? affinity);
new Microsoft.VisualStudio.Text.Editor.IntraTextAdornmentTag : System.Windows.UIElement * Microsoft.VisualStudio.Text.Editor.AdornmentRemovedCallback * Nullable<Microsoft.VisualStudio.Text.PositionAffinity> -> Microsoft.VisualStudio.Text.Editor.IntraTextAdornmentTag
Public Sub New (adornment As UIElement, removalCallback As AdornmentRemovedCallback, affinity As Nullable(Of PositionAffinity))
Parameters
- adornment
- UIElement
The adornment to be displayed at tag's position. Must not be null.
- removalCallback
- AdornmentRemovedCallback
Called when adornment is removed from the view. May be null.
- affinity
- Nullable<PositionAffinity>
The affinity of the adornment. Should be null iff the adornment has a zero-length span at the view's text buffer.
Remarks
The width (and height, if not specified in the tag) of the white space allocated is determined by measuring the adornment using Measure(Size) and DesiredSize before adornment
is placed in the visual tree. If adornment
cannot determine its size before being added to the visual tree, you must explicitly set the width of adornment
before returning a tag that contains it.
Applies to
IntraTextAdornmentTag(UIElement, AdornmentRemovedCallback, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<PositionAffinity>)
Initializes a new instance of a IntraTextAdornmentTag.
public:
IntraTextAdornmentTag(System::Windows::UIElement ^ adornment, Microsoft::VisualStudio::Text::Editor::AdornmentRemovedCallback ^ removalCallback, Nullable<double> topSpace, Nullable<double> baseline, Nullable<double> textHeight, Nullable<double> bottomSpace, Nullable<Microsoft::VisualStudio::Text::PositionAffinity> affinity);
public IntraTextAdornmentTag (System.Windows.UIElement adornment, Microsoft.VisualStudio.Text.Editor.AdornmentRemovedCallback removalCallback, double? topSpace, double? baseline, double? textHeight, double? bottomSpace, Microsoft.VisualStudio.Text.PositionAffinity? affinity);
new Microsoft.VisualStudio.Text.Editor.IntraTextAdornmentTag : System.Windows.UIElement * Microsoft.VisualStudio.Text.Editor.AdornmentRemovedCallback * Nullable<double> * Nullable<double> * Nullable<double> * Nullable<double> * Nullable<Microsoft.VisualStudio.Text.PositionAffinity> -> Microsoft.VisualStudio.Text.Editor.IntraTextAdornmentTag
Public Sub New (adornment As UIElement, removalCallback As AdornmentRemovedCallback, topSpace As Nullable(Of Double), baseline As Nullable(Of Double), textHeight As Nullable(Of Double), bottomSpace As Nullable(Of Double), affinity As Nullable(Of PositionAffinity))
Parameters
- adornment
- UIElement
The adornment to be displayed at tag's position. Must not be null.
- removalCallback
- AdornmentRemovedCallback
Called when adornment is removed from the view. May be null.
The amount of space needed between the top of the text in the ITextViewLine and the top of the ITextViewLine.
The amount of space needed between the bottom of the text in the ITextViewLine and the bottom of the ITextViewLine.
- affinity
- Nullable<PositionAffinity>
The affinity of the adornment. Should be null iff the adornment has a non-zero-length span at the view's text buffer.
Remarks
The width (and height, if not specified in the tag) of the white space allocated is determined by measuring the adornment using Measure(Size) and DesiredSize before adornment
is placed in the visual tree. If adornment
cannot determine its size before being added to the visual tree, you must explicitly set the width of adornment
before returning a tag that contains it.