Create a class for the custom widget

The backbone of the designer is a custom widget. It allows you to wrap existing designer views into a multi-view designer. The custom widget can reside either in the project of the targeted widget or in a separate project. Because the designers are usually coupled with a specific widget, we recommended creating the designer in the same project as the widget. 

To create the class for the designer, perform the following.

  1. Add a new class to the project of the targeted widget.
    For example, if your widget is named MultiViewWidget, create a class named MultiViewWidgetDesigner.cs
    Perform the following:
    1. In the context menu of References, click Add Reference...
    2. Click Browse tab and navigate to folder C:\Program Files (x86)\Telerik\Sitefinity CMS\Libraries.
    3. Select the assembly and click OK.
  2. Add a reference to the System.Web.Extensions assembly.
    Perform the following
    1. In the context menu of References, click Add Reference...
    2. Click the .NET tab, select the assembly, and click OK.
  3. Add statement using Telerik.Sitefinity.Web.UI.ControlDesign; to the RotatorDesigner class.
  4. Make the MultiViewWidgetDesigner class inherit the ContentViewDesignerBase class.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?