IContentControl Interface

Summary

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

Syntax

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

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.
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(string) object
Finds the specified resource by searching up the logical tree and then global styles.
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(string) 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.
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.
TranslatePoint(Point, IVisual) Point
Translates a point relative to this visual to coordinates that are relative to the specified visual. The visual and relativeTo should be descendants of the same root window
TryFindResource(string, object) bool
Tries to the specified resource by searching up the logical tree and then global styles.