Table of Contents

Class SelectableTextBlock

Namespace
CarinaStudio.Controls
Assembly
CarinaStudio.AppBase.Avalonia.dll

Extended Avalonia.Controls.SelectableTextBlock.

public class SelectableTextBlock : SelectableTextBlock, INotifyPropertyChanged, IDataContextProvider, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, IInputElement, IDataTemplateHost, INamed, ISetterValue, ILogical
Inheritance
AvaloniaObject
Animatable
StyledElement
Visual
Layoutable
Interactive
InputElement
Control
TextBlock
SelectableTextBlock
SelectableTextBlock
Implements
IDataContextProvider
IThemeVariantHost
IResourceHost
IResourceNode
IStyleHost
ISetLogicalParent
ISetInheritanceParent
IStyleable
IInputElement
IDataTemplateHost
INamed
ISetterValue
ILogical
Derived
Inherited Members
SelectableTextBlock.SelectionStartProperty
SelectableTextBlock.SelectionEndProperty
SelectableTextBlock.SelectedTextProperty
SelectableTextBlock.SelectionBrushProperty
SelectableTextBlock.CanCopyProperty
SelectableTextBlock.CopyingToClipboardEvent
SelectableTextBlock.Copy()
SelectableTextBlock.SelectAll()
SelectableTextBlock.ClearSelection()
SelectableTextBlock.OnGotFocus(GotFocusEventArgs)
SelectableTextBlock.OnLostFocus(RoutedEventArgs)
SelectableTextBlock.RenderTextLayout(DrawingContext, Point)
SelectableTextBlock.OnKeyDown(KeyEventArgs)
SelectableTextBlock.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
SelectableTextBlock.OnPointerPressed(PointerPressedEventArgs)
SelectableTextBlock.OnPointerMoved(PointerEventArgs)
SelectableTextBlock.OnPointerReleased(PointerReleasedEventArgs)
SelectableTextBlock.SelectionBrush
SelectableTextBlock.SelectionStart
SelectableTextBlock.SelectionEnd
SelectableTextBlock.SelectedText
SelectableTextBlock.CanCopy
SelectableTextBlock.CopyingToClipboard
TextBlock.BackgroundProperty
TextBlock.PaddingProperty
TextBlock.FontFamilyProperty
TextBlock.FontSizeProperty
TextBlock.FontStyleProperty
TextBlock.FontWeightProperty
TextBlock.FontStretchProperty
TextBlock.ForegroundProperty
TextBlock.BaselineOffsetProperty
TextBlock.LineHeightProperty
TextBlock.LineSpacingProperty
TextBlock.LetterSpacingProperty
TextBlock.MaxLinesProperty
TextBlock.TextProperty
TextBlock.TextAlignmentProperty
TextBlock.TextWrappingProperty
TextBlock.TextTrimmingProperty
TextBlock.TextDecorationsProperty
TextBlock.InlinesProperty
TextBlock.GetBaselineOffset(Control)
TextBlock.GetTextAlignment(Control)
TextBlock.SetTextAlignment(Control, TextAlignment)
TextBlock.GetTextWrapping(Control)
TextBlock.SetTextWrapping(Control, TextWrapping)
TextBlock.GetTextTrimming(Control)
TextBlock.SetTextTrimming(Control, TextTrimming)
TextBlock.GetLineHeight(Control)
TextBlock.GetLetterSpacing(Control)
TextBlock.GetMaxLines(Control)
TextBlock.Render(DrawingContext)
TextBlock.InvalidateTextLayout()
TextBlock.OnMeasureInvalidated()
TextBlock.ArrangeOverride(Size)
TextBlock.OnCreateAutomationPeer()
TextBlock.TextLayout
TextBlock.Padding
TextBlock.Background
TextBlock.Text
TextBlock.FontFamily
TextBlock.FontSize
TextBlock.FontStyle
TextBlock.FontWeight
TextBlock.FontStretch
TextBlock.Foreground
TextBlock.LineHeight
TextBlock.LineSpacing
TextBlock.LetterSpacing
TextBlock.MaxLines
TextBlock.TextWrapping
TextBlock.TextTrimming
TextBlock.TextAlignment
TextBlock.TextDecorations
TextBlock.Inlines
TextBlock.BypassFlowDirectionPolicies
TextBlock.BaselineOffset
Control.FocusAdornerProperty
Control.TagProperty
Control.ContextMenuProperty
Control.ContextFlyoutProperty
Control.RequestBringIntoViewEvent
Control.ContextRequestedEvent
Control.LoadedEvent
Control.UnloadedEvent
Control.SizeChangedEvent
Control.GetTemplateFocusTarget()
Control.OnLoaded(RoutedEventArgs)
Control.OnUnloaded(RoutedEventArgs)
Control.OnSizeChanged(SizeChangedEventArgs)
Control.OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)
Control.OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)
Control.OnKeyUp(KeyEventArgs)
Control.FocusAdorner
Control.DataTemplates
Control.ContextMenu
Control.ContextFlyout
Control.IsLoaded
Control.Tag
Control.ContextRequested
Control.Loaded
Control.Unloaded
Control.SizeChanged
InputElement.FocusableProperty
InputElement.IsEnabledProperty
InputElement.IsEffectivelyEnabledProperty
InputElement.CursorProperty
InputElement.IsKeyboardFocusWithinProperty
InputElement.IsFocusedProperty
InputElement.IsHitTestVisibleProperty
InputElement.IsPointerOverProperty
InputElement.IsTabStopProperty
InputElement.GotFocusEvent
InputElement.LostFocusEvent
InputElement.KeyDownEvent
InputElement.KeyUpEvent
InputElement.TabIndexProperty
InputElement.TextInputEvent
InputElement.TextInputMethodClientRequestedEvent
InputElement.PointerEnteredEvent
InputElement.PointerExitedEvent
InputElement.PointerMovedEvent
InputElement.PointerPressedEvent
InputElement.PointerReleasedEvent
InputElement.PointerCaptureLostEvent
InputElement.PointerWheelChangedEvent
InputElement.TappedEvent
InputElement.HoldingEvent
InputElement.DoubleTappedEvent
InputElement.Focus(NavigationMethod, KeyModifiers)
InputElement.OnTextInput(TextInputEventArgs)
InputElement.OnPointerEntered(PointerEventArgs)
InputElement.OnPointerExited(PointerEventArgs)
InputElement.OnPointerCaptureLost(PointerCaptureLostEventArgs)
InputElement.OnPointerWheelChanged(PointerWheelEventArgs)
InputElement.UpdateIsEffectivelyEnabled()
InputElement.Focusable
InputElement.IsEnabled
InputElement.Cursor
InputElement.IsKeyboardFocusWithin
InputElement.IsFocused
InputElement.IsHitTestVisible
InputElement.IsPointerOver
InputElement.IsTabStop
InputElement.IsEffectivelyEnabled
InputElement.TabIndex
InputElement.KeyBindings
InputElement.IsEnabledCore
InputElement.GestureRecognizers
InputElement.GotFocus
InputElement.LostFocus
InputElement.KeyDown
InputElement.KeyUp
InputElement.TextInput
InputElement.TextInputMethodClientRequested
InputElement.PointerEntered
InputElement.PointerExited
InputElement.PointerMoved
InputElement.PointerPressed
InputElement.PointerReleased
InputElement.PointerCaptureLost
InputElement.PointerWheelChanged
InputElement.Tapped
InputElement.Holding
InputElement.DoubleTapped
Interactive.RaiseEvent(RoutedEventArgs)
Interactive.BuildEventRoute(RoutedEvent)
Layoutable.DesiredSizeProperty
Layoutable.WidthProperty
Layoutable.HeightProperty
Layoutable.MinWidthProperty
Layoutable.MaxWidthProperty
Layoutable.MinHeightProperty
Layoutable.MaxHeightProperty
Layoutable.MarginProperty
Layoutable.HorizontalAlignmentProperty
Layoutable.VerticalAlignmentProperty
Layoutable.UseLayoutRoundingProperty
Layoutable.UpdateLayout()
Layoutable.ApplyTemplate()
Layoutable.Measure(Size)
Layoutable.Arrange(Rect)
Layoutable.InvalidateMeasure()
Layoutable.InvalidateArrange()
Layoutable.AffectsMeasure<T>(params AvaloniaProperty[])
Layoutable.AffectsArrange<T>(params AvaloniaProperty[])
Layoutable.MeasureCore(Size)
Layoutable.ArrangeCore(Rect)
Layoutable.OnVisualParentChanged(Visual, Visual)
Layoutable.Width
Layoutable.Height
Layoutable.MinWidth
Layoutable.MaxWidth
Layoutable.MinHeight
Layoutable.MaxHeight
Layoutable.Margin
Layoutable.HorizontalAlignment
Layoutable.VerticalAlignment
Layoutable.DesiredSize
Layoutable.IsMeasureValid
Layoutable.IsArrangeValid
Layoutable.UseLayoutRounding
Layoutable.EffectiveViewportChanged
Layoutable.LayoutUpdated
Visual.BoundsProperty
Visual.ClipToBoundsProperty
Visual.ClipProperty
Visual.IsVisibleProperty
Visual.OpacityProperty
Visual.OpacityMaskProperty
Visual.EffectProperty
Visual.HasMirrorTransformProperty
Visual.RenderTransformProperty
Visual.RenderTransformOriginProperty
Visual.FlowDirectionProperty
Visual.VisualParentProperty
Visual.ZIndexProperty
Visual.GetFlowDirection(Visual)
Visual.SetFlowDirection(Visual, FlowDirection)
Visual.InvalidateVisual()
Visual.AffectsRender<T>(params AvaloniaProperty[])
Visual.InvalidateMirrorTransform()
Visual.Bounds
Visual.ClipToBounds
Visual.Clip
Visual.IsEffectivelyVisible
Visual.IsVisible
Visual.Opacity
Visual.OpacityMask
Visual.Effect
Visual.HasMirrorTransform
Visual.RenderTransform
Visual.RenderTransformOrigin
Visual.FlowDirection
Visual.ZIndex
Visual.VisualChildren
Visual.VisualRoot
Visual.AttachedToVisualTree
Visual.DetachedFromVisualTree
StyledElement.DataContextProperty
StyledElement.NameProperty
StyledElement.ParentProperty
StyledElement.TemplatedParentProperty
StyledElement.ThemeProperty
StyledElement.BeginInit()
StyledElement.EndInit()
StyledElement.ApplyStyling()
StyledElement.InitializeIfNeeded()
StyledElement.OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs)
StyledElement.OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs)
StyledElement.OnDataContextBeginUpdate()
StyledElement.OnDataContextEndUpdate()
StyledElement.OnInitialized()
StyledElement.Name
StyledElement.Classes
StyledElement.DataContext
StyledElement.IsInitialized
StyledElement.Styles
StyledElement.StyleKey
StyledElement.Resources
StyledElement.TemplatedParent
StyledElement.Theme
StyledElement.LogicalChildren
StyledElement.PseudoClasses
StyledElement.Parent
StyledElement.ActualThemeVariant
StyledElement.AttachedToLogicalTree
StyledElement.DetachedFromLogicalTree
StyledElement.DataContextChanged
StyledElement.Initialized
StyledElement.ResourcesChanged
StyledElement.ActualThemeVariantChanged
Animatable.TransitionsProperty
Animatable.OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs)
Animatable.Transitions
AvaloniaObject.CheckAccess()
AvaloniaObject.VerifyAccess()
AvaloniaObject.ClearValue(AvaloniaProperty)
AvaloniaObject.ClearValue<T>(AvaloniaProperty<T>)
AvaloniaObject.ClearValue<T>(StyledProperty<T>)
AvaloniaObject.ClearValue<T>(DirectPropertyBase<T>)
AvaloniaObject.GetHashCode()
AvaloniaObject.GetValue(AvaloniaProperty)
AvaloniaObject.GetValue<T>(StyledProperty<T>)
AvaloniaObject.GetValue<T>(DirectPropertyBase<T>)
AvaloniaObject.GetBaseValue<T>(StyledProperty<T>)
AvaloniaObject.IsAnimating(AvaloniaProperty)
AvaloniaObject.IsSet(AvaloniaProperty)
AvaloniaObject.SetValue<T>(StyledProperty<T>, T, BindingPriority)
AvaloniaObject.SetValue<T>(DirectPropertyBase<T>, T)
AvaloniaObject.SetCurrentValue<T>(StyledProperty<T>, T)
AvaloniaObject.CoerceValue(AvaloniaProperty)
AvaloniaObject.RaisePropertyChanged<T>(DirectPropertyBase<T>, T, T)
AvaloniaObject.SetAndRaise<T>(DirectPropertyBase<T>, ref T, T)
AvaloniaObject.InheritanceParent
AvaloniaObject.this[AvaloniaProperty]
AvaloniaObject.this[IndexerDescriptor]
AvaloniaObject.PropertyChanged
Extension Methods

Constructors

SelectableTextBlock()

Initialize new SelectableTextBlock instance.

public SelectableTextBlock()

Fields

IsMultiLineTextProperty

Property of IsMultiLineText.

public static readonly DirectProperty<SelectableTextBlock, bool> IsMultiLineTextProperty

Field Value

DirectProperty<SelectableTextBlock, bool>

IsTextTrimmedProperty

Property of IsTextTrimmed.

public static readonly DirectProperty<SelectableTextBlock, bool> IsTextTrimmedProperty

Field Value

DirectProperty<SelectableTextBlock, bool>

ShowToolTipWhenTextTrimmedProperty

public static readonly StyledProperty<bool> ShowToolTipWhenTextTrimmedProperty

Field Value

StyledProperty<bool>

ToolTipTemplateProperty

Property of ToolTipTemplate.

public static readonly StyledProperty<IDataTemplate?> ToolTipTemplateProperty

Field Value

StyledProperty<IDataTemplate>

Properties

DebugLogger

Get or set logger for debugging purpose.

public ILogger? DebugLogger { get; set; }

Property Value

ILogger

IsMultiLineText

Check whether text inside the TextBlock has multiple lines or not.

public bool IsMultiLineText { get; }

Property Value

bool

IsTextTrimmed

Check whether text inside the TextBlock has been trimmed or not.

public bool IsTextTrimmed { get; protected set; }

Property Value

bool

ShowToolTipWhenTextTrimmed

Get or set whether tooltip is needed to be shown if text inside the control has been trimmed or not.

public bool ShowToolTipWhenTextTrimmed { get; set; }

Property Value

bool

StyleKeyOverride

Gets the type by which the element is styled.

protected override Type StyleKeyOverride { get; }

Property Value

Type

Remarks

Usually controls are styled by their own type, but there are instances where you want an element to be styled by its base type, e.g. creating SpecialButton that derives from Button and adds extra functionality but is still styled as a regular Button. Override this property to change the style for a control class, returning the type that you wish the elements to be styled as.

ToolTipTemplate

Get or set template for building tooltip.

public IDataTemplate? ToolTipTemplate { get; set; }

Property Value

IDataTemplate

Methods

MeasureOverride(Size)

Measures the control and its child elements as part of a layout pass.

protected override Size MeasureOverride(Size availableSize)

Parameters

availableSize Size

The size available to the control.

Returns

Size

The desired size for the control.

OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)

Called when the control is added to a rooted visual tree.

protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)

Parameters

e VisualTreeAttachmentEventArgs

The event args.

OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs)

Called when the control is removed from a rooted visual tree.

protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)

Parameters

e VisualTreeAttachmentEventArgs

The event args.