IContentControl Interface

Summary

Defines a control that displays Content according to a FuncDataTemplate.
graph BT Type-.->Interface0["IControl"] click Interface0 "/api/Avalonia.Controls/IControl" Type-.->Interface1["IDataTemplateHost"] click Interface1 "/api/Avalonia.Controls.Templates/IDataTemplateHost" Type-.->Interface2["ILayoutable"] click Interface2 "/api/Avalonia.Layout/ILayoutable" Type-.->Interface3["IInputElement"] click Interface3 "/api/Avalonia.Input/IInputElement" Type-.->Interface4["IInteractive"] click Interface4 "/api/Avalonia.Interactivity/IInteractive" Type-.->Interface5["IVisual"] click Interface5 "/api/Avalonia.VisualTree/IVisual" Type-.->Interface6["IStyledElement"] click Interface6 "/api/Avalonia/IStyledElement" Type-.->Interface7["IStyleable"] click Interface7 "/api/Avalonia.Styling/IStyleable" Type-.->Interface8["INamed"] click Interface8 "/api/Avalonia/INamed" Type-.->Interface9["IStyleHost"] click Interface9 "/api/Avalonia.Styling/IStyleHost" Type-.->Interface10["ILogical"] click Interface10 "/api/Avalonia.LogicalTree/ILogical" Type-.->Interface11["IResourceNode"] click Interface11 "/api/Avalonia.Controls/IResourceNode" Type-.->Interface12["IResourceProvider"] click Interface12 "/api/Avalonia.Controls/IResourceProvider" Type-.->Interface13["IDataContextProvider"] click Interface13 "/api/Avalonia/IDataContextProvider" Type-.->Interface14["IAvaloniaObject"] click Interface14 "/api/Avalonia/IAvaloniaObject" Type["IContentControl"] class Type type-node Implementing0["ReactiveWindow<TViewModel>"]-.->Type click Implementing0 "/api/Avalonia.ReactiveUI/ReactiveWindow_1" Implementing1["UserControl"]-.->Type click Implementing1 "/api/Avalonia.Controls/UserControl" Implementing2["RadioButton"]-.->Type click Implementing2 "/api/Avalonia.Controls/RadioButton" Implementing3["PopupRoot"]-.->Type click Implementing3 "/api/Avalonia.Controls.Primitives/PopupRoot" Implementing4["ViewModelViewHost"]-.->Type click Implementing4 "/api/Avalonia.ReactiveUI/ViewModelViewHost" Implementing5["ComboBoxItem"]-.->Type click Implementing5 "/api/Avalonia.Controls/ComboBoxItem" Implementing6["TabItem"]-.->Type click Implementing6 "/api/Avalonia.Controls/TabItem" Implementing7["ListBoxItem"]-.->Type click Implementing7 "/api/Avalonia.Controls/ListBoxItem" Implementing8["ScrollViewer"]-.->Type click Implementing8 "/api/Avalonia.Controls/ScrollViewer" Implementing9["DevTools"]-.->Type click Implementing9 "/api/Avalonia.Diagnostics/DevTools" Implementing10["DataGridCell"]-.->Type click Implementing10 "/api/Avalonia.Controls/DataGridCell" Implementing11["ButtonSpinner"]-.->Type click Implementing11 "/api/Avalonia.Controls/ButtonSpinner" Implementing12["RepeatButton"]-.->Type click Implementing12 "/api/Avalonia.Controls/RepeatButton" Implementing13["TransitioningContentControl"]-.->Type click Implementing13 "/api/Avalonia.ReactiveUI/TransitioningContentControl" Implementing14["Spinner"]-.->Type click Implementing14 "/api/Avalonia.Controls/Spinner" Implementing15["TabStripItem"]-.->Type click Implementing15 "/api/Avalonia.Controls.Primitives/TabStripItem" Implementing16["ToolTip"]-.->Type click Implementing16 "/api/Avalonia.Controls/ToolTip" Implementing17["CalendarButton"]-.->Type click Implementing17 "/api/Avalonia.Controls.Primitives/CalendarButton" Implementing18["DataGridRowHeader"]-.->Type click Implementing18 "/api/Avalonia.Controls.Primitives/DataGridRowHeader" Implementing19["HeaderedContentControl"]-.->Type click Implementing19 "/api/Avalonia.Controls.Primitives/HeaderedContentControl" Implementing20["EmbeddableControlRoot"]-.->Type click Implementing20 "/api/Avalonia.Controls.Embedding/EmbeddableControlRoot" Implementing21["ReactiveUserControl<TViewModel>"]-.->Type click Implementing21 "/api/Avalonia.ReactiveUI/ReactiveUserControl_1" Implementing22["CheckBox"]-.->Type click Implementing22 "/api/Avalonia.Controls/CheckBox" Implementing23["CalendarDayButton"]-.->Type click Implementing23 "/api/Avalonia.Controls.Primitives/CalendarDayButton" Implementing24["ToggleButton"]-.->Type click Implementing24 "/api/Avalonia.Controls.Primitives/ToggleButton" Implementing25["DataGridColumnHeader"]-.->Type click Implementing25 "/api/Avalonia.Controls/DataGridColumnHeader" Implementing26["Expander"]-.->Type click Implementing26 "/api/Avalonia.Controls/Expander" Implementing27["RoutedViewHost"]-.->Type click Implementing27 "/api/Avalonia.ReactiveUI/RoutedViewHost" Implementing28["ContentControl"]-.->Type click Implementing28 "/api/Avalonia.Controls/ContentControl" Implementing29["Button"]-.->Type click Implementing29 "/api/Avalonia.Controls/Button" Implementing30["DropDownItem"]-.->Type click Implementing30 "/api/Avalonia.Controls/DropDownItem" Implementing31["NotificationCard"]-.->Type click Implementing31 "/api/Avalonia.Controls.Notifications/NotificationCard" Implementing32["DataValidationErrors"]-.->Type click Implementing32 "/api/Avalonia.Controls/DataValidationErrors" Implementing33["Window"]-.->Type click Implementing33 "/api/Avalonia.Controls/Window" Implementing34["WindowBase"]-.->Type click Implementing34 "/api/Avalonia.Controls/WindowBase" Implementing35["AboutAvaloniaDialog"]-.->Type click Implementing35 "/api/Avalonia.Dialogs/AboutAvaloniaDialog" Implementing36["OverlayPopupHost"]-.->Type click Implementing36 "/api/Avalonia.Controls.Primitives/OverlayPopupHost" Implementing37["TopLevel"]-.->Type click Implementing37 "/api/Avalonia.Controls/TopLevel"

Syntax

public interface IContentControl : IControl, IDataTemplateHost, ILayoutable, IInputElement, 
    IInteractive, IVisual, IStyledElement, IStyleable, INamed, IStyleHost, ILogical, IResourceNode, 
    IResourceProvider, IDataContextProvider, IAvaloniaObject

Properties

Name Value Summary
Content object
Gets or sets the content to display.
ContentTemplate IDataTemplate
Gets or sets the data template used to display the content of the control.
HorizontalContentAlignment HorizontalAlignment
Gets or sets the horizontal alignment of the content within the control.
VerticalContentAlignment VerticalAlignment
Gets or sets the vertical alignment of the content within the control.

Extension Methods

Name Value Summary
Bind(AvaloniaProperty, IBinding, object) IDisposable
Binds a property on an IAvaloniaObject to an IBinding.
BringIntoView() void
Tries to bring the control into view.
BringIntoView(Rect) void
Tries to bring the control into view.
CalculateDistanceFromAncestor(IVisual) int
Calculates the distance from a visual's IRenderRoot.
Find<T>(string) T
Finds a named element in an INameScope.
FindCommonVisualAncestor(IVisual) IVisual
Tries to get the first common ancestor of two visuals.
FindControl<T>(string) T
Finds the named control in the scope of the specified control.
FindDataTemplate(object, IDataTemplate) IDataTemplate
Find a data template that matches a piece of data.
FindNameScope() INameScope
FindResource(object) object
Finds the specified resource by searching up the logical tree and then global styles.
Get<T>(string) T
Gets a named element from an INameScope or throws if no element of the requested name was found.
GetInputElementsAt(Point) IEnumerable<IInputElement>
Returns the active input elements at a point on an IInputElement.
GetLogicalAncestors() IEnumerable<ILogical>
GetLogicalChildren() IEnumerable<ILogical>
GetLogicalDescendants() IEnumerable<ILogical>
GetLogicalParent() ILogical
GetLogicalParent<T>() T
GetLogicalSiblings() IEnumerable<ILogical>
GetObservable(AvaloniaProperty) IObservable<object>
Gets an observable for a AvaloniaProperty.
GetObservable<T>(AvaloniaProperty<T>) IObservable<T>
Gets an observable for a AvaloniaProperty.
GetObservable<TEventArgs>(RoutedEvent<TEventArgs>, RoutingStrategies, bool) IObservable<TEventArgs>
Gets an observable for a RoutedEvent<TEventArgs>.
GetPropertyChangedObservable(AvaloniaProperty) IObservable<AvaloniaPropertyChangedEventArgs>
Gets an observable that listens for property changed events for an AvaloniaProperty.
GetResourceObservable(object) IObservable<object>
GetSelfAndLogicalAncestors() IEnumerable<ILogical>
GetSelfAndLogicalDescendants() IEnumerable<ILogical>
GetSelfAndVisualAncestors() IEnumerable<IVisual>
Enumerates an IVisual and its ancestors in the visual tree.
GetSelfAndVisualDescendants() IEnumerable<IVisual>
Enumerates an IVisual and its descendants in the visual tree.
GetSubject(AvaloniaProperty, BindingPriority) ISubject<object>
Gets a subject for a AvaloniaProperty.
GetSubject<T>(AvaloniaProperty<T>, BindingPriority) ISubject<T>
Gets a subject for a AvaloniaProperty.
GetVisualAncestors() IEnumerable<IVisual>
Enumerates the ancestors of an IVisual in the visual tree.
GetVisualAt(Point) IVisual
Gets the first visual in the visual tree whose bounds contain a point.
GetVisualChildren() IEnumerable<IVisual>
Enumerates the children of an IVisual in the visual tree.
GetVisualDescendants() IEnumerable<IVisual>
Enumerates the descendants of an IVisual in the visual tree.
GetVisualParent() IVisual
Gets the visual parent of an IVisual.
GetVisualParent<T>() T
Gets the visual parent of an IVisual.
GetVisualRoot() IRenderRoot
Gets the root visual for an IVisual.
GetVisualsAt(Point) IEnumerable<IVisual>
Enumerates the visible visuals in the visual tree whose bounds contain a point.
GetVisualsAt(Point, Func<IVisual, bool>) IEnumerable<IVisual>
Enumerates the visuals in the visual tree whose bounds contain a point.
HitTestCustom(Point) bool
InputHitTest(Point) IInputElement
Returns the topmost active input element at a point on an IInputElement.
IsLogicalParentOf(ILogical) bool
IsVisualAncestorOf(IVisual) bool
Tests whether an IVisual is an ancestor of another visual.
PointToClient(PixelPoint) Point
Converts a point from screen to client coordinates.
PointToScreen(Point) PixelPoint
Converts a point from client to screen coordinates.
TransformToVisual(IVisual) Matrix?
Returns a transform that transforms the visual's coordinates into the coordinates of the specified to.
TranslatePoint(Point, IVisual) Point?
Translates a point relative to this visual to coordinates that are relative to the specified visual.
TryFindResource(object, object) bool
Tries to the specified resource by searching up the logical tree and then global styles.