Class ComponentViewModel<TPropertiesType>
- Namespace
- Kentico.PageBuilder.Web.Mvc
- Assembly
- Kentico.Content.Web.Mvc.dll
View model for a component with properties.
public class ComponentViewModel<TPropertiesType> : ComponentViewModel where TPropertiesType : class, IComponentProperties, new()
Type Parameters
TPropertiesType
Type of the component properties.
- Inheritance
-
objectComponentViewModel<TPropertiesType>
- Derived
- Inherited Members
- Extension Methods
Properties
Properties
Component properties.
public TPropertiesType Properties { get; }
Property Value
- TPropertiesType
Methods
Create(RoutedWebPage, TPropertiesType)
Creates a new instance of a ComponentViewModel.
public static ComponentViewModel<TPropertiesType> Create(RoutedWebPage page, TPropertiesType properties)
Parameters
page
RoutedWebPageRepresents a document on which this view model is used for a Page builder component.
properties
TPropertiesTypeRepresents a properties for a Page builder component.
Returns
- ComponentViewModel<TPropertiesType>
Remarks
Method should be used in case of rendering a Page builder component with only the view. In that case by convention the view model of type ComponentViewModel<TPropertiesType> is passed to the view.