Summary
Defines a control that displays
Content
according to a
FuncDataTemplate
.
- Namespace
- Avalonia
.Controls - Interfaces
- Implementing Types
-
- AboutAvaloniaDialog
- TopLevel
- ReactiveUserControl
<TViewModel> - DataValidationErrors
- Transitioning
Content Control - CheckBox
- OverlayPopupHost
- DataGridColumnHeader
- DataGridRowHeader
- DropDownItem
- ViewModelViewHost
- ScrollViewer
- ReactiveWindow
<TViewModel> - SplitView
- ButtonSpinner
- Expander
- RepeatButton
- ContentControl
- Button
- Label
- NotificationCard
- CalendarButton
- TabItem
- ToggleSwitch
- Embeddable
Control Root - Headered
Content Control - TabStripItem
- ToolTip
- Spinner
- UserControl
- RadioButton
- RoutedViewHost
- PopupRoot
- CalendarDayButton
- ToggleButton
- ComboBoxItem
- Window
- WindowBase
- DataGridCell
- ListBoxItem
- FlyoutPresenter
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["IResourceHost"]
click Interface11 "/api/Avalonia.Controls/IResourceHost"
Type-.->Interface12["IResourceNode"]
click Interface12 "/api/Avalonia.Controls/IResourceNode"
Type-.->Interface13["IDataContextProvider"]
click Interface13 "/api/Avalonia/IDataContextProvider"
Type-.->Interface14["IAvaloniaObject"]
click Interface14 "/api/Avalonia/IAvaloniaObject"
Type-.->Interface15["ISupportInitialize"]
Type["IContentControl"]
class Type type-node
Implementing0["AboutAvaloniaDialog"]-.->Type
click Implementing0 "/api/Avalonia.Dialogs/AboutAvaloniaDialog"
Implementing1["TopLevel"]-.->Type
click Implementing1 "/api/Avalonia.Controls/TopLevel"
Implementing2["ReactiveUserControl<TViewModel>"]-.->Type
click Implementing2 "/api/Avalonia.ReactiveUI/ReactiveUserControl_1"
Implementing3["DataValidationErrors"]-.->Type
click Implementing3 "/api/Avalonia.Controls/DataValidationErrors"
Implementing4["TransitioningContentControl"]-.->Type
click Implementing4 "/api/Avalonia.ReactiveUI/TransitioningContentControl"
Implementing5["CheckBox"]-.->Type
click Implementing5 "/api/Avalonia.Controls/CheckBox"
Implementing6["OverlayPopupHost"]-.->Type
click Implementing6 "/api/Avalonia.Controls.Primitives/OverlayPopupHost"
Implementing7["DataGridColumnHeader"]-.->Type
click Implementing7 "/api/Avalonia.Controls/DataGridColumnHeader"
Implementing8["DataGridRowHeader"]-.->Type
click Implementing8 "/api/Avalonia.Controls.Primitives/DataGridRowHeader"
Implementing9["DropDownItem"]-.->Type
click Implementing9 "/api/Avalonia.Controls/DropDownItem"
Implementing10["ViewModelViewHost"]-.->Type
click Implementing10 "/api/Avalonia.ReactiveUI/ViewModelViewHost"
Implementing11["ScrollViewer"]-.->Type
click Implementing11 "/api/Avalonia.Controls/ScrollViewer"
Implementing12["ReactiveWindow<TViewModel>"]-.->Type
click Implementing12 "/api/Avalonia.ReactiveUI/ReactiveWindow_1"
Implementing13["SplitView"]-.->Type
click Implementing13 "/api/Avalonia.Controls/SplitView"
Implementing14["ButtonSpinner"]-.->Type
click Implementing14 "/api/Avalonia.Controls/ButtonSpinner"
Implementing15["Expander"]-.->Type
click Implementing15 "/api/Avalonia.Controls/Expander"
Implementing16["RepeatButton"]-.->Type
click Implementing16 "/api/Avalonia.Controls/RepeatButton"
Implementing17["ContentControl"]-.->Type
click Implementing17 "/api/Avalonia.Controls/ContentControl"
Implementing18["Button"]-.->Type
click Implementing18 "/api/Avalonia.Controls/Button"
Implementing19["Label"]-.->Type
click Implementing19 "/api/Avalonia.Controls/Label"
Implementing20["NotificationCard"]-.->Type
click Implementing20 "/api/Avalonia.Controls.Notifications/NotificationCard"
Implementing21["CalendarButton"]-.->Type
click Implementing21 "/api/Avalonia.Controls.Primitives/CalendarButton"
Implementing22["TabItem"]-.->Type
click Implementing22 "/api/Avalonia.Controls/TabItem"
Implementing23["ToggleSwitch"]-.->Type
click Implementing23 "/api/Avalonia.Controls/ToggleSwitch"
Implementing24["EmbeddableControlRoot"]-.->Type
click Implementing24 "/api/Avalonia.Controls.Embedding/EmbeddableControlRoot"
Implementing25["HeaderedContentControl"]-.->Type
click Implementing25 "/api/Avalonia.Controls.Primitives/HeaderedContentControl"
Implementing26["TabStripItem"]-.->Type
click Implementing26 "/api/Avalonia.Controls.Primitives/TabStripItem"
Implementing27["ToolTip"]-.->Type
click Implementing27 "/api/Avalonia.Controls/ToolTip"
Implementing28["Spinner"]-.->Type
click Implementing28 "/api/Avalonia.Controls/Spinner"
Implementing29["UserControl"]-.->Type
click Implementing29 "/api/Avalonia.Controls/UserControl"
Implementing30["RadioButton"]-.->Type
click Implementing30 "/api/Avalonia.Controls/RadioButton"
Implementing31["RoutedViewHost"]-.->Type
click Implementing31 "/api/Avalonia.ReactiveUI/RoutedViewHost"
Implementing32["PopupRoot"]-.->Type
click Implementing32 "/api/Avalonia.Controls.Primitives/PopupRoot"
Implementing33["CalendarDayButton"]-.->Type
click Implementing33 "/api/Avalonia.Controls.Primitives/CalendarDayButton"
Implementing34["ToggleButton"]-.->Type
click Implementing34 "/api/Avalonia.Controls.Primitives/ToggleButton"
Implementing35["ComboBoxItem"]-.->Type
click Implementing35 "/api/Avalonia.Controls/ComboBoxItem"
Implementing36["Window"]-.->Type
click Implementing36 "/api/Avalonia.Controls/Window"
Implementing37["WindowBase"]-.->Type
click Implementing37 "/api/Avalonia.Controls/WindowBase"
Implementing38["DataGridCell"]-.->Type
click Implementing38 "/api/Avalonia.Controls/DataGridCell"
Implementing39["ListBoxItem"]-.->Type
click Implementing39 "/api/Avalonia.Controls/ListBoxItem"
Implementing40["FlyoutPresenter"]-.->Type
click Implementing40 "/api/Avalonia.Controls/FlyoutPresenter"
Syntax
public interface IContentControl : IControl, IDataTemplateHost, ILayoutable, IInputElement,
IInteractive, IVisual, IStyledElement, IStyleable, INamed, IStyleHost, ILogical, IResourceHost,
IResourceNode, IDataContextProvider, IAvaloniaObject, ISupportInitialize
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.
|
Horizontal |
HorizontalAlignment |
Gets or sets the horizontal alignment of the content within the control.
|
Vertical |
VerticalAlignment |
Gets or sets the vertical alignment of the content within the control.
|
Extension Methods
Name | Value | Summary |
---|---|---|
AddDisposableHandler |
IDisposable |
Adds a handler for the specified routed event and returns a disposable that can terminate the event subscription.
|
Bind |
IDisposable |
Binds a
AvaloniaProperty to an observable.
|
Bind |
IDisposable |
Binds a
AvaloniaProperty to an observable.
|
BindClass |
IDisposable | |
BringIntoView |
void |
Tries to bring the control into view.
From ControlExtensions
|
BringIntoView |
void |
Tries to bring the control into view.
From ControlExtensions
|
Calculate |
int |
Calculates the distance from a visual's ancestor.
From VisualExtensions
|
Find |
T |
Finds a named element in an
INameScope .
From NameScopeExtensions
|
FindAncestorOfType |
T |
Finds first ancestor of given type.
From VisualExtensions
|
Find |
IVisual |
Tries to get the first common ancestor of two visuals.
From VisualExtensions
|
FindControl |
T |
Finds the named control in the scope of the specified control.
From ControlExtensions
|
FindDataTemplate |
IDataTemplate? |
Find a data template that matches a piece of data.
|
FindDescendantOfType |
T |
Finds first descendant of given type.
From VisualExtensions
|
Find |
T |
Finds first ancestor of given type.
From LogicalExtensions
|
Find |
T |
Finds first descendant of given type.
From LogicalExtensions
|
FindNameScope |
INameScope |
From NameScopeExtensions
|
FindResource |
object? |
Finds the specified resource by searching up the logical tree and then global styles.
|
Get |
T |
Gets a named element from an
INameScope or throws if no element of the
requested name was found.
From NameScopeExtensions
|
GetBindingObservable |
IObservable |
Gets an observable for a
AvaloniaProperty .
|
GetBindingObservable |
IObservable |
Gets an observable for a
AvaloniaProperty .
|
GetBindingSubject |
ISubject |
Gets a subject for a
AvaloniaProperty .
|
GetBindingSubject |
ISubject |
Gets a subject for a
AvaloniaProperty .
|
GetInputElementsAt |
IEnumerable |
Returns the active input elements at a point on an
IInputElement .
From InputExtensions
|
GetLogicalAncestors |
IEnumerable |
Enumerates the ancestors of an
ILogical in the logical tree.
From LogicalExtensions
|
GetLogicalChildren |
IEnumerable |
Enumerates the children of an
ILogical in the logical tree.
From LogicalExtensions
|
Get |
IEnumerable |
Enumerates the descendants of an
ILogical in the logical tree.
From LogicalExtensions
|
GetLogicalParent |
ILogical |
Gets the logical parent of an
ILogical .
From LogicalExtensions
|
GetLogicalParent |
T |
Gets the logical parent of an
ILogical .
From LogicalExtensions
|
GetLogicalSiblings |
IEnumerable |
Enumerates the siblings of an
ILogical in the logical tree.
From LogicalExtensions
|
GetObservable |
IObservable |
Gets an observable for a
AvaloniaProperty .
|
GetObservable |
IObservable |
Gets an observable for a
AvaloniaProperty .
|
GetObservable |
IObservable |
Gets an observable for a
RoutedEvent<TEventArgs> .
|
Get |
IObservable |
Gets an observable that listens for property changed events for an
AvaloniaProperty .
|
Get |
IObservable |
|
Get |
IEnumerable |
Enumerates an
ILogical and its ancestors in the logical tree.
From LogicalExtensions
|
Get |
IEnumerable |
Enumerates an
ILogical and its descendants in the logical tree.
From LogicalExtensions
|
Get |
IEnumerable |
Enumerates an
IVisual and its ancestors in the visual tree.
From VisualExtensions
|
Get |
IEnumerable |
Enumerates an
IVisual and its descendants in the visual tree.
From VisualExtensions
|
GetSubject |
ISubject |
Gets a subject for a
AvaloniaProperty .
|
GetSubject |
ISubject |
Gets a subject for a
AvaloniaProperty .
|
GetVisualAncestors |
IEnumerable |
Enumerates the ancestors of an
IVisual in the visual tree.
From VisualExtensions
|
GetVisualAt |
IVisual |
Gets the first visual in the visual tree whose bounds contain a point.
From VisualExtensions
|
GetVisualAt |
IVisual |
Gets the first visual in the visual tree whose bounds contain a point.
From VisualExtensions
|
GetVisualChildren |
IEnumerable |
Enumerates the children of an
IVisual in the visual tree.
From VisualExtensions
|
GetVisualDescendants |
IEnumerable |
Enumerates the descendants of an
IVisual in the visual tree.
From VisualExtensions
|
GetVisualParent |
IVisual |
Gets the visual parent of an
IVisual .
From VisualExtensions
|
GetVisualParent |
T |
Gets the visual parent of an
IVisual .
From VisualExtensions
|
GetVisualRoot |
IRenderRoot |
Gets the root visual for an
IVisual .
From VisualExtensions
|
GetVisualsAt |
IEnumerable |
Enumerates the visible visuals in the visual tree whose bounds contain a point.
From VisualExtensions
|
GetVisualsAt |
IEnumerable |
Enumerates the visuals in the visual tree whose bounds contain a point.
From VisualExtensions
|
HitTestCustom |
bool | |
InputHitTest |
IInputElement? |
Returns the topmost active input element at a point on an
IInputElement .
From InputExtensions
|
InputHitTest |
IInputElement? |
Returns the topmost active input element at a point on an
IInputElement .
From InputExtensions
|
IsLogicalAncestorOf |
bool |
Tests whether an
ILogical is an ancestor of another logical.
From LogicalExtensions
|
IsVisualAncestorOf |
bool |
Tests whether an
IVisual is an ancestor of another visual.
From VisualExtensions
|
PointToClient |
Point |
Converts a point from screen to client coordinates.
From VisualExtensions
|
PointToScreen |
PixelPoint |
Converts a point from client to screen coordinates.
From VisualExtensions
|
TransformToVisual |
Matrix? |
Returns a transform that transforms the visual's coordinates into the coordinates
of the specified to.
From VisualExtensions
|
TranslatePoint |
Point? |
Translates a point relative to this visual to coordinates that are relative to the specified visual.
From VisualExtensions
|
TryFindResource |
bool |
Tries to the specified resource by searching up the logical tree and then global styles.
|