In This Article

BorderBeam Class

Decorates a child control with an animated beam along a rounded border and soft inner illumination.

public class BorderBeam : Control, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, INamed, IInputElement, IDataTemplateHost, ISetterValue
Inheritance:
object AvaloniaObject Animatable StyledElement Visual Layoutable Interactive InputElement Control object
Implements:
IDataContextProvider ILogical IThemeVariantHost IResourceHost IResourceNode IStyleHost ISetLogicalParent ISetInheritanceParent INamed IInputElement IDataTemplateHost ISetterValue

Remarks

The normal background and border remain visible independently of the animated effect.

Constructors

BorderBeam()

Initializes an instance of the class.

public BorderBeam()

Properties

ActivationDuration

The duration of a complete transition between inactive and active effect states.

public TimeSpan ActivationDuration { get; set; }

Property Value

TimeSpan:

The default value is 250 milliseconds. Negative values are coerced to Zero.

Background

Gets or sets a brush with which to paint the background.

public IBrush? Background { get; set; }

Property Value

IBrush

BackgroundSizing

Gets or sets how the background is drawn relative to the border.

public BackgroundSizing BackgroundSizing { get; set; }

Property Value

BackgroundSizing

BeamLength

The base length of a traveling beam, measured in DIPs along the perimeter.

public double BeamLength { get; set; }

Property Value

double:

The default value is 180.0. The value must be finite and nonnegative.

Remarks

The effective length is automatically constrained when necessary to fit a smaller perimeter. A value of 0.0 suppresses traveling beam and beam-driven cloud rendering.

BeamSpeed

The uniform traveling-beam speed, measured in DIPs per second.

public double BeamSpeed { get; set; }

Property Value

double:

The default value is 275.0. The value must be finite and nonnegative.

Remarks

This value applies only when Mode is Uniform. A value of 0.0 pauses motion at the retained position.

BeamThickness

The thickness of the animated perimeter beam, measured in DIPs.

public double BeamThickness { get; set; }

Property Value

double:

The default value is 1.0. The value must be finite and nonnegative.

Remarks

A value of 0.0 suppresses the animated perimeter without suppressing independently configured inner illumination.

BorderBrush

Gets or sets a brush with which to paint the border.

public IBrush? BorderBrush { get; set; }

Property Value

IBrush

BorderThickness

Gets or sets the thickness of the border.

public Thickness BorderThickness { get; set; }

Property Value

Thickness

BoxShadow

Gets or sets the box shadow effect parameters

public BoxShadows BoxShadow { get; set; }

Property Value

BoxShadows

Child

The child Avalonia.Controls.Control to decorate.

[Content]
public Control? Child { get; set; }

Property Value

Control

CornerRadius

Gets or sets the radius of the border rounded corners.

public CornerRadius CornerRadius { get; set; }

Property Value

CornerRadius

GradientStops

The ordered color stops sampled by the animated perimeter and inner illumination.

public GradientStops? GradientStops { get; set; }

Property Value

GradientStops:

The default value is null.

Remarks

A null or empty collection uses the current theme's default palette.

InnerGlowIntensity

The relative intensity of the soft inner illumination.

public double InnerGlowIntensity { get; set; }

Property Value

double:

The default value is 0.35. Finite values are coerced to the range 0.0..1.0.

Remarks

A value of 0.0 suppresses all inner illumination rendering.

InnerGlowRadius

The maximum inward reach of the soft inner illumination, measured in DIPs from the animated beam's inner edge.

public double InnerGlowRadius { get; set; }

Property Value

double:

The default value is 15.0. The value must be finite and nonnegative.

Remarks

A value of 0.0 suppresses all inner illumination rendering.

IsActive

Whether the animated beam and inner illumination are active.

public bool IsActive { get; set; }

Property Value

bool:

The default value is true.

IsAnimationEnabled

Whether animation is enabled.

public bool IsAnimationEnabled { get; set; }

Property Value

bool:

The default value is true.

Mode

The animated behavior of the control.

public BorderBeamMode Mode { get; set; }

Property Value

BorderBeamMode:

The default value is Sling.

Padding

Gets or sets the padding to place around the Avalonia.Controls.Decorator.Child control.

public Thickness Padding { get; set; }

Property Value

Thickness

SlingCircuitDuration

The duration of one complete circuit for sling motion.

public TimeSpan SlingCircuitDuration { get; set; }

Property Value

TimeSpan:

The default value is 2.0 seconds.

Remarks

This value applies only when Mode is Sling and must be greater than Zero.

Methods

ArrangeOverride(Size)

Positions child elements as part of a layout pass.

protected override Size ArrangeOverride(Size finalSize)
Parameter Type Description
finalSize Size

The size available to the control.

Returns

Size:

The actual size used.

MeasureOverride(Size)

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

protected override Size MeasureOverride(Size availableSize)
Parameter Type Description
availableSize Size

The size available to the control.

Returns

Size:

The desired size for the control.

Fields

ActivationDurationProperty

Defines the ActivationDuration property.

public static readonly StyledProperty<TimeSpan> ActivationDurationProperty

BackgroundProperty

Defines the Background property.

public static readonly StyledProperty<IBrush?> BackgroundProperty

BackgroundSizingProperty

Defines the BackgroundSizing property.

public static readonly StyledProperty<BackgroundSizing> BackgroundSizingProperty

BeamLengthProperty

Defines the BeamLength property.

public static readonly StyledProperty<double> BeamLengthProperty

BeamSpeedProperty

Defines the BeamSpeed property.

public static readonly StyledProperty<double> BeamSpeedProperty

BeamThicknessProperty

Defines the BeamThickness property.

public static readonly StyledProperty<double> BeamThicknessProperty

BorderBrushProperty

Defines the BorderBrush property.

public static readonly StyledProperty<IBrush?> BorderBrushProperty

BorderThicknessProperty

Defines the BorderThickness property.

public static readonly StyledProperty<Thickness> BorderThicknessProperty

BoxShadowProperty

Defines the BoxShadow property.

public static readonly StyledProperty<BoxShadows> BoxShadowProperty

ChildProperty

Defines the Child property.

public static readonly StyledProperty<Control?> ChildProperty

CornerRadiusProperty

Defines the CornerRadius property.

public static readonly StyledProperty<CornerRadius> CornerRadiusProperty

GradientStopsProperty

Defines the GradientStops property.

public static readonly StyledProperty<GradientStops?> GradientStopsProperty

InnerGlowIntensityProperty

Defines the InnerGlowIntensity property.

public static readonly StyledProperty<double> InnerGlowIntensityProperty

InnerGlowRadiusProperty

Defines the InnerGlowRadius property.

public static readonly StyledProperty<double> InnerGlowRadiusProperty

IsActiveProperty

Defines the IsActive property.

public static readonly StyledProperty<bool> IsActiveProperty

IsAnimationEnabledProperty

Defines the IsAnimationEnabled property.

public static readonly StyledProperty<bool> IsAnimationEnabledProperty

ModeProperty

Defines the Mode property.

public static readonly StyledProperty<BorderBeamMode> ModeProperty

PaddingProperty

Defines the Padding property.

public static readonly StyledProperty<Thickness> PaddingProperty

SlingCircuitDurationProperty

Defines the SlingCircuitDuration property.

public static readonly StyledProperty<TimeSpan> SlingCircuitDurationProperty

Inherited Members

  • Control.FocusAdornerProperty
  • Control.TagProperty
  • Control.ContextMenuProperty
  • Control.ContextFlyoutProperty
  • Control.RequestBringIntoViewEvent
  • Control.LoadedEvent
  • Control.UnloadedEvent
  • Control.SizeChangedEvent
  • Control.GetTemplateFocusTarget()
  • Control.OnLoaded(RoutedEventArgs)
  • Control.OnUnloaded(RoutedEventArgs)
  • Control.OnSizeChanged(SizeChangedEventArgs)
  • Control.OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)
  • Control.OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)
  • Control.OnGotFocus(FocusChangedEventArgs)
  • Control.OnLostFocus(FocusChangedEventArgs)
  • Control.OnCreateAutomationPeer()
  • Control.OnPointerReleased(PointerReleasedEventArgs)
  • Control.OnKeyUp(KeyEventArgs)
  • Control.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
  • Control.UpdateDataValidation(AvaloniaProperty, BindingValueType, Exception)
  • Control.FocusAdorner
  • Control.DataTemplates
  • Control.ContextMenu
  • Control.ContextFlyout
  • Control.IsLoaded
  • Control.Tag
  • 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.GettingFocusEvent
  • InputElement.LostFocusEvent
  • InputElement.LosingFocusEvent
  • 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.ContextRequestedEvent
  • InputElement.ContextCanceledEvent
  • InputElement.IsHoldingEnabledProperty
  • InputElement.IsHoldWithMouseEnabledProperty
  • InputElement.PinchEvent
  • InputElement.PinchEndedEvent
  • InputElement.PullGestureEvent
  • InputElement.PullGestureEndedEvent
  • InputElement.SwipeGestureEvent
  • InputElement.SwipeGestureEndedEvent
  • InputElement.ScrollGestureEvent
  • InputElement.ScrollGestureInertiaStartingEvent
  • InputElement.ScrollGestureEndedEvent
  • InputElement.PointerTouchPadGestureMagnifyEvent
  • InputElement.PointerTouchPadGestureRotateEvent
  • InputElement.PointerTouchPadGestureSwipeEvent
  • InputElement.TappedEvent
  • InputElement.RightTappedEvent
  • InputElement.HoldingEvent
  • InputElement.DoubleTappedEvent
  • InputElement.Focus(NavigationMethod, KeyModifiers)
  • InputElement.OnAccessKey(RoutedEventArgs)
  • InputElement.OnGettingFocus(FocusChangingEventArgs)
  • InputElement.OnLosingFocus(FocusChangingEventArgs)
  • InputElement.OnKeyDown(KeyEventArgs)
  • InputElement.OnTextInput(TextInputEventArgs)
  • InputElement.OnPointerEntered(PointerEventArgs)
  • InputElement.OnPointerExited(PointerEventArgs)
  • InputElement.OnPointerMoved(PointerEventArgs)
  • InputElement.OnPointerPressed(PointerPressedEventArgs)
  • InputElement.GetNextTabStopOverride()
  • InputElement.GetPreviousTabStopOverride()
  • InputElement.GetFirstFocusableElementOverride()
  • InputElement.GetLastFocusableElementOverride()
  • InputElement.OnPointerCaptureLost(PointerCaptureLostEventArgs)
  • InputElement.ProcessTabStopOverride(IInputElement, IInputElement, bool, bool, ref IInputElement)
  • InputElement.ProcessCandidateTabStopOverride(IInputElement, IInputElement, IInputElement, bool, ref IInputElement)
  • InputElement.OnPointerWheelChanged(PointerWheelEventArgs)
  • InputElement.OnTapped(TappedEventArgs)
  • InputElement.OnRightTapped(TappedEventArgs)
  • InputElement.OnDoubleTapped(TappedEventArgs)
  • InputElement.OnHolding(HoldingRoutedEventArgs)
  • InputElement.UpdateIsEffectivelyEnabled()
  • InputElement.GetIsHoldingEnabled(StyledElement)
  • InputElement.SetIsHoldingEnabled(StyledElement, bool)
  • InputElement.GetIsHoldWithMouseEnabled(StyledElement)
  • InputElement.SetIsHoldWithMouseEnabled(StyledElement, bool)
  • 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.GettingFocus
  • InputElement.LostFocus
  • InputElement.LosingFocus
  • InputElement.KeyDown
  • InputElement.KeyUp
  • InputElement.TextInput
  • InputElement.TextInputMethodClientRequested
  • InputElement.PointerEntered
  • InputElement.PointerExited
  • InputElement.PointerMoved
  • InputElement.PointerPressed
  • InputElement.PointerReleased
  • InputElement.PointerCaptureLost
  • InputElement.PointerWheelChanged
  • InputElement.ContextRequested
  • InputElement.ContextCanceled
  • InputElement.Pinch
  • InputElement.PinchEnded
  • InputElement.PullGesture
  • InputElement.PullGestureEnded
  • InputElement.ScrollGesture
  • InputElement.ScrollGestureInertiaStarting
  • InputElement.ScrollGestureEnded
  • InputElement.PointerTouchPadGestureMagnify
  • InputElement.PointerTouchPadGestureRotate
  • InputElement.SwipeGesture
  • InputElement.SwipeGestureEnded
  • InputElement.PointerTouchPadGestureSwipe
  • InputElement.Tapped
  • InputElement.RightTapped
  • InputElement.Holding
  • InputElement.DoubleTapped
  • Interactive.AddHandler(RoutedEvent, Delegate, RoutingStrategies, bool)
  • Interactive.AddHandler<TEventArgs>(RoutedEvent<TEventArgs>, EventHandler<TEventArgs>, RoutingStrategies, bool)
  • Interactive.RemoveHandler(RoutedEvent, Delegate)
  • Interactive.RemoveHandler<TEventArgs>(RoutedEvent<TEventArgs>, EventHandler<TEventArgs>)
  • 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.OnMeasureInvalidated()
  • 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.CacheModeProperty
  • Visual.EffectProperty
  • Visual.HasMirrorTransformProperty
  • Visual.RenderTransformProperty
  • Visual.RenderTransformOriginProperty
  • Visual.FlowDirectionProperty
  • Visual.VisualParentProperty
  • Visual.ZIndexProperty
  • Visual.GetFlowDirection(Visual)
  • Visual.SetFlowDirection(Visual, FlowDirection)
  • Visual.InvalidateVisual()
  • Visual.Render(DrawingContext)
  • Visual.AffectsRender<T>(params AvaloniaProperty[])
  • Visual.LogicalChildrenCollectionChanged(object, NotifyCollectionChangedEventArgs)
  • Visual.OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)
  • Visual.OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs)
  • Visual.InvalidateMirrorTransform()
  • Visual.Bounds
  • Visual.ClipToBounds
  • Visual.Clip
  • Visual.IsEffectivelyVisible
  • Visual.IsVisible
  • Visual.Opacity
  • Visual.OpacityMask
  • Visual.CacheMode
  • Visual.Effect
  • Visual.HasMirrorTransform
  • Visual.RenderTransform
  • Visual.RenderTransformOrigin
  • Visual.FlowDirection
  • Visual.ZIndex
  • Visual.VisualChildren
  • Visual.VisualRoot
  • Visual.BypassFlowDirectionPolicies
  • Visual.AttachedToVisualTree
  • Visual.DetachedFromVisualTree
  • StyledElement.DataContextProperty
  • StyledElement.NameProperty
  • StyledElement.ParentProperty
  • StyledElement.TemplatedParentProperty
  • StyledElement.ThemeProperty
  • StyledElement.BeginInit()
  • StyledElement.EndInit()
  • StyledElement.ApplyStyling()
  • StyledElement.InitializeIfNeeded()
  • StyledElement.TryGetResource(object, ThemeVariant, out object)
  • StyledElement.OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs)
  • StyledElement.OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs)
  • StyledElement.OnDataContextChanged(EventArgs)
  • 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.StyleKeyOverride
  • 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.Equals(object)
  • 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(AvaloniaProperty, object, BindingPriority)
  • AvaloniaObject.SetValue<T>(StyledProperty<T>, T, BindingPriority)
  • AvaloniaObject.SetValue<T>(DirectPropertyBase<T>, T)
  • AvaloniaObject.SetCurrentValue(AvaloniaProperty, object)
  • AvaloniaObject.SetCurrentValue<T>(StyledProperty<T>, T)
  • AvaloniaObject.Bind(AvaloniaProperty, BindingBase)
  • AvaloniaObject.Bind(AvaloniaProperty, IObservable<object>, BindingPriority)
  • AvaloniaObject.Bind<T>(StyledProperty<T>, IObservable<object>, BindingPriority)
  • AvaloniaObject.Bind<T>(StyledProperty<T>, IObservable<T>, BindingPriority)
  • AvaloniaObject.Bind<T>(StyledProperty<T>, IObservable<BindingValue<T>>, BindingPriority)
  • AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<object>)
  • AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<T>)
  • AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<BindingValue<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.Dispatcher
  • AvaloniaObject.PropertyChanged
  • object.GetType()
  • object.MemberwiseClone()
  • object.ToString()
  • object.Equals(object, object)
  • object.ReferenceEquals(object, object)

Extension Methods