I want Draw Other ContentPage On ContentPage Like Parent And Child Relationship.
Xamarin Can This?
how can I draw ContentView in a ContentPage?
From document Xamarin.Forms ContentView ,we can know:
The Xamarin.Forms ContentView class is a type of Layout that contains a single child element and is typically used to create custom, reusable controls. The ContentView class inherits from TemplatedView.
The ContentView
class defines a single property:
Content is a View
object. This property is backed by a BindableProperty object so it can be the target of data bindings. The ContentView
also inherits a property from the TemplatedView
class:
ControlTemplate is a ControlTemplate
that can define or override the appearance of the control.
The ContentView
class can be used to create a custom control.
The process for creating a custom control is to:
For more details, you can check: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/layouts/contentview .
And there is also a sample included in above document , you can check it here: https://docs.microsoft.com/en-us/samples/xamarin/xamarin-forms-samples/userinterface-contentviewdemos/ .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.