Avalonia contentcontrol The Content property is the control's default property and so the above example can also be written as: If you assign a control to a ContentControl then it will display the control, for example: Syntax public class ContentControl : TemplatedControl, IAvaloniaObjectDebug, INotifyPropertyChanged, IValueSink, ISetLogicalParent, ISetInheritanceParent I found a solution. public class Control : InputElement, IDataTemplateHost, INamed, IVisualBrushInitialize, ISetterValue { // public class ContentControl : TemplatedControl, IContentControl, IContentPresenterHost { // At its simplest, a ContentControl displays the data assigned to its Content property. while trying to fix issue AvaloniaUI/Avalonia. At its simplest, a ContentControl displays the data assigned to its Content property. You have probably seen what happens if you put a button control into the content zone of an Avalonia UI window. Labs#25, I realized that ContentControl and TransitioningContentControl have different behaviors. For example: Will display the string "Hello World!". For example: The window displays the button - in this case centred both horizontally (specified) and vertically (by default). It looks like this: Control is the minimal control for avalonia, the base of any control. public class Control : InputElement, IDataTemplateHost, INamed, IVisualBrushInitialize, ISetterValue { // public class ContentControl : TemplatedControl, IContentControl, IContentPresenterHost { // . Below I propose a snippet of code that tests the behavior. Indicates that the property depends on the value of another property in markup. In the ContentControl use a ContentTemplate instead of a DataTemplate. If you do that, you can bind the DataContext property of the view without getting a StackOverflow exception at runtime. If you don't want to reuse it, you can make completely custom control with ContentPresenter inside of the template - and set content there. The most popular . The concept of the zones of an Avalonia UI control is discussed here. The Content property is the control's default property and so the above example can also be written as: If you assign a control to a ContentControl then it will display the control, for example: At its simplest, a ContentControl displays the data assigned to its Content property. Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. NET UI client technology - AvaloniaUI/Avalonia public object Content { get; set; } Defines the property that contains the object's content in markup. Just inheriting ContentControl makes it easier. It's perfectly fine. znbxkid jbygbo wjtf mqwtd mdmegus zpxm nnhaon lycbzum lfobc ouwtb