Class FormattedTextBlock
- Namespace
- CarinaStudio.Controls
- Assembly
- CarinaStudio.AppBase.Avalonia.dll
TextBlock which shows formatted text on it.
public class FormattedTextBlock : TextBlock, INotifyPropertyChanged, IDataContextProvider, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, IInputElement, IDataTemplateHost, INamed, ISetterValue, ILogical
- Inheritance
-
AvaloniaObjectAnimatableStyledElementVisualLayoutableInteractiveInputElementControlTextBlockFormattedTextBlock
- Implements
-
IDataContextProviderIThemeVariantHostIResourceHostIResourceNodeIStyleHostISetLogicalParentISetInheritanceParentIStyleableIInputElementIDataTemplateHostINamedISetterValueILogical
- Inherited Members
-
TextBlock.BackgroundPropertyTextBlock.PaddingPropertyTextBlock.FontFamilyPropertyTextBlock.FontSizePropertyTextBlock.FontStylePropertyTextBlock.FontWeightPropertyTextBlock.FontStretchPropertyTextBlock.ForegroundPropertyTextBlock.BaselineOffsetPropertyTextBlock.LineHeightPropertyTextBlock.LineSpacingPropertyTextBlock.LetterSpacingPropertyTextBlock.MaxLinesPropertyTextBlock.TextPropertyTextBlock.TextAlignmentPropertyTextBlock.TextWrappingPropertyTextBlock.TextTrimmingPropertyTextBlock.TextDecorationsPropertyTextBlock.InlinesPropertyTextBlock.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.RenderTextLayout(DrawingContext, Point)TextBlock.InvalidateTextLayout()TextBlock.OnMeasureInvalidated()TextBlock.ArrangeOverride(Size)TextBlock.OnCreateAutomationPeer()TextBlock.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)TextBlock.TextLayoutTextBlock.PaddingTextBlock.BackgroundTextBlock.FontFamilyTextBlock.FontSizeTextBlock.FontStyleTextBlock.FontWeightTextBlock.FontStretchTextBlock.ForegroundTextBlock.LineHeightTextBlock.LineSpacingTextBlock.LetterSpacingTextBlock.MaxLinesTextBlock.TextWrappingTextBlock.TextTrimmingTextBlock.TextAlignmentTextBlock.TextDecorationsTextBlock.InlinesTextBlock.BypassFlowDirectionPoliciesTextBlock.BaselineOffsetControl.FocusAdornerPropertyControl.TagPropertyControl.ContextMenuPropertyControl.ContextFlyoutPropertyControl.RequestBringIntoViewEventControl.ContextRequestedEventControl.LoadedEventControl.UnloadedEventControl.SizeChangedEventControl.GetTemplateFocusTarget()Control.OnLoaded(RoutedEventArgs)Control.OnUnloaded(RoutedEventArgs)Control.OnSizeChanged(SizeChangedEventArgs)Control.OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)Control.OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)Control.OnGotFocus(GotFocusEventArgs)Control.OnLostFocus(RoutedEventArgs)Control.OnPointerReleased(PointerReleasedEventArgs)Control.OnKeyUp(KeyEventArgs)Control.FocusAdornerControl.DataTemplatesControl.ContextMenuControl.ContextFlyoutControl.IsLoadedControl.TagControl.ContextRequestedControl.LoadedControl.UnloadedControl.SizeChangedInputElement.FocusablePropertyInputElement.IsEnabledPropertyInputElement.IsEffectivelyEnabledPropertyInputElement.CursorPropertyInputElement.IsKeyboardFocusWithinPropertyInputElement.IsFocusedPropertyInputElement.IsHitTestVisiblePropertyInputElement.IsPointerOverPropertyInputElement.IsTabStopPropertyInputElement.GotFocusEventInputElement.LostFocusEventInputElement.KeyDownEventInputElement.KeyUpEventInputElement.TabIndexPropertyInputElement.TextInputEventInputElement.TextInputMethodClientRequestedEventInputElement.PointerEnteredEventInputElement.PointerExitedEventInputElement.PointerMovedEventInputElement.PointerPressedEventInputElement.PointerReleasedEventInputElement.PointerCaptureLostEventInputElement.PointerWheelChangedEventInputElement.TappedEventInputElement.HoldingEventInputElement.DoubleTappedEventInputElement.Focus(NavigationMethod, KeyModifiers)InputElement.OnKeyDown(KeyEventArgs)InputElement.OnTextInput(TextInputEventArgs)InputElement.OnPointerEntered(PointerEventArgs)InputElement.OnPointerExited(PointerEventArgs)InputElement.OnPointerMoved(PointerEventArgs)InputElement.OnPointerPressed(PointerPressedEventArgs)InputElement.OnPointerCaptureLost(PointerCaptureLostEventArgs)InputElement.OnPointerWheelChanged(PointerWheelEventArgs)InputElement.UpdateIsEffectivelyEnabled()InputElement.FocusableInputElement.IsEnabledInputElement.CursorInputElement.IsKeyboardFocusWithinInputElement.IsFocusedInputElement.IsHitTestVisibleInputElement.IsPointerOverInputElement.IsTabStopInputElement.IsEffectivelyEnabledInputElement.TabIndexInputElement.KeyBindingsInputElement.IsEnabledCoreInputElement.GestureRecognizersInputElement.GotFocusInputElement.LostFocusInputElement.KeyDownInputElement.KeyUpInputElement.TextInputInputElement.TextInputMethodClientRequestedInputElement.PointerEnteredInputElement.PointerExitedInputElement.PointerMovedInputElement.PointerPressedInputElement.PointerReleasedInputElement.PointerCaptureLostInputElement.PointerWheelChangedInputElement.TappedInputElement.HoldingInputElement.DoubleTappedInteractive.RaiseEvent(RoutedEventArgs)Interactive.BuildEventRoute(RoutedEvent)Layoutable.DesiredSizePropertyLayoutable.WidthPropertyLayoutable.HeightPropertyLayoutable.MinWidthPropertyLayoutable.MaxWidthPropertyLayoutable.MinHeightPropertyLayoutable.MaxHeightPropertyLayoutable.MarginPropertyLayoutable.HorizontalAlignmentPropertyLayoutable.VerticalAlignmentPropertyLayoutable.UseLayoutRoundingPropertyLayoutable.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.WidthLayoutable.HeightLayoutable.MinWidthLayoutable.MaxWidthLayoutable.MinHeightLayoutable.MaxHeightLayoutable.MarginLayoutable.HorizontalAlignmentLayoutable.VerticalAlignmentLayoutable.DesiredSizeLayoutable.IsMeasureValidLayoutable.IsArrangeValidLayoutable.UseLayoutRoundingLayoutable.EffectiveViewportChangedLayoutable.LayoutUpdatedVisual.BoundsPropertyVisual.ClipToBoundsPropertyVisual.ClipPropertyVisual.IsVisiblePropertyVisual.OpacityPropertyVisual.OpacityMaskPropertyVisual.EffectPropertyVisual.HasMirrorTransformPropertyVisual.RenderTransformPropertyVisual.RenderTransformOriginPropertyVisual.FlowDirectionPropertyVisual.VisualParentPropertyVisual.ZIndexPropertyVisual.GetFlowDirection(Visual)Visual.SetFlowDirection(Visual, FlowDirection)Visual.InvalidateVisual()Visual.AffectsRender<T>(params AvaloniaProperty[])Visual.InvalidateMirrorTransform()Visual.BoundsVisual.ClipToBoundsVisual.ClipVisual.IsEffectivelyVisibleVisual.IsVisibleVisual.OpacityVisual.OpacityMaskVisual.EffectVisual.HasMirrorTransformVisual.RenderTransformVisual.RenderTransformOriginVisual.FlowDirectionVisual.ZIndexVisual.VisualChildrenVisual.VisualRootVisual.AttachedToVisualTreeVisual.DetachedFromVisualTreeStyledElement.DataContextPropertyStyledElement.NamePropertyStyledElement.ParentPropertyStyledElement.TemplatedParentPropertyStyledElement.ThemePropertyStyledElement.BeginInit()StyledElement.EndInit()StyledElement.ApplyStyling()StyledElement.InitializeIfNeeded()StyledElement.OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs)StyledElement.OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs)StyledElement.OnDataContextBeginUpdate()StyledElement.OnDataContextEndUpdate()StyledElement.OnInitialized()StyledElement.NameStyledElement.ClassesStyledElement.DataContextStyledElement.IsInitializedStyledElement.StylesStyledElement.StyleKeyStyledElement.ResourcesStyledElement.TemplatedParentStyledElement.ThemeStyledElement.LogicalChildrenStyledElement.PseudoClassesStyledElement.ParentStyledElement.ActualThemeVariantStyledElement.AttachedToLogicalTreeStyledElement.DetachedFromLogicalTreeStyledElement.DataContextChangedStyledElement.InitializedStyledElement.ResourcesChangedStyledElement.ActualThemeVariantChangedAnimatable.TransitionsPropertyAnimatable.OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs)Animatable.TransitionsAvaloniaObject.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.InheritanceParentAvaloniaObject.this[AvaloniaProperty]AvaloniaObject.this[IndexerDescriptor]AvaloniaObject.PropertyChanged
- Extension Methods
Constructors
FormattedTextBlock()
Initialize new FormattedTextBlock instance.
public FormattedTextBlock()
Fields
Arg1Property
Property of Arg1.
public static readonly StyledProperty<object?> Arg1Property
Field Value
- StyledProperty<object>
Arg2Property
Property of Arg2.
public static readonly StyledProperty<object?> Arg2Property
Field Value
- StyledProperty<object>
Arg3Property
Property of Arg3.
public static readonly StyledProperty<object?> Arg3Property
Field Value
- StyledProperty<object>
Arg4Property
Property of Arg4.
public static readonly StyledProperty<object?> Arg4Property
Field Value
- StyledProperty<object>
Arg5Property
Property of Arg5.
public static readonly StyledProperty<object?> Arg5Property
Field Value
- StyledProperty<object>
Arg6Property
Property of Arg6.
public static readonly StyledProperty<object?> Arg6Property
Field Value
- StyledProperty<object>
Arg7Property
Property of Arg7.
public static readonly StyledProperty<object?> Arg7Property
Field Value
- StyledProperty<object>
Arg8Property
Property of Arg8.
public static readonly StyledProperty<object?> Arg8Property
Field Value
- StyledProperty<object>
Arg9Property
Property of Arg9.
public static readonly StyledProperty<object?> Arg9Property
Field Value
- StyledProperty<object>
FormatProperty
Property of Format.
public static readonly StyledProperty<string?> FormatProperty
Field Value
- StyledProperty<string>
Properties
Arg1
Get or set 1st argument to generate formatted string.
public object? Arg1 { get; set; }
Property Value
Arg2
Get or set 2nd argument to generate formatted string.
public object? Arg2 { get; set; }
Property Value
Arg3
Get or set 3rd argument to generate formatted string.
public object? Arg3 { get; set; }
Property Value
Arg4
Get or set 4th argument to generate formatted string.
public object? Arg4 { get; set; }
Property Value
Arg5
Get or set 5th argument to generate formatted string.
public object? Arg5 { get; set; }
Property Value
Arg6
Get or set 6th argument to generate formatted string.
public object? Arg6 { get; set; }
Property Value
Arg7
Get or set 7th argument to generate formatted string.
public object? Arg7 { get; set; }
Property Value
Arg8
Get or set 8th argument to generate formatted string.
public object? Arg8 { get; set; }
Property Value
Arg9
Get or set 9th argument to generate formatted string.
public object? Arg9 { get; set; }
Property Value
Format
Get or set string format.
public string? Format { get; set; }
Property Value
StyleKeyOverride
Gets the type by which the element is styled.
protected override Type StyleKeyOverride { get; }
Property Value
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.
Text
Get formatted text.
public string? Text { get; }