Xamarin.Forms.ContentView Class
An element that contains a single child element.

See Also: ContentView Members

Syntax

[Xamarin.Forms.ContentProperty("Content")]
public class ContentView : Layout

Remarks

The Xamarin.Forms.ContentView class has the following XAML property:

PropertyValue
Content

The Xamarin.Forms.View object that represents the visual content of the Xamarin.Forms.ContentView.

The following example shows how to construct a new ContentView with a Label inside.

C# Example

var layout = new ContentView {
  Content = new Label { Text = "I'm Content!" },
};
          

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.2.0.0, 1.3.0.0