Class ComponentViewModel
- Namespace
 - Kentico.PageBuilder.Web.Mvc
 
- Assembly
 - Kentico.Content.Web.Mvc.dll
 
View model for a component without properties.
public class ComponentViewModel
  - Inheritance
 - 
      objectComponentViewModel
 
- Derived
 
- Extension Methods
 
Constructors
ComponentViewModel()
public ComponentViewModel()
  Properties
CacheDependencies
Provides access to the cache dependencies of components that support output caching.
public ICacheDependencies CacheDependencies { get; }
  Property Value
Remarks
Caching is supported for widgets only.
- See Also
 
Page
Page where the component is placed.
public RoutedWebPage Page { get; }
  Property Value
Methods
Create(RoutedWebPage)
Creates a new instance of a ComponentViewModel.
public static ComponentViewModel Create(RoutedWebPage page)
  Parameters
pageRoutedWebPageRepresents a document on which this view model is used for a Page builder component.
Returns
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 is passed to the view.