Introducing WPF Item Template Support for Visual Studio
Detailed Blog page Skeleton loader
Introducing WPF Item Template Support for Visual Studio

We are glad to announce that the Syncfusion  WPF item template support for Visual Studio is now available in our Essential Studio® 2021 Volume 1 release.

Syncfusion WPF item templates are designed to facilitate the seamless integration of Syncfusion WPF controls. With these, developers can effortlessly incorporate the required XAML files and assemblies for a Syncfusion control directly from the user interface. This streamlined approach enhances productivity and simplifies the development process, ensuring a smoother experience when building WPF apps with Syncfusion’s feature-rich components.

In this blog, we are going to explain how to install the Syncfusion WPF extensions and then add the Syncfusion WPF controls to your app with the new item template support.

Install the Syncfusion WPF extensions

The new WPF item template support is included in the Syncfusion WPF extensions. So, to use them, we should install the Syncfusion WPF extensions in Visual Studio.

Install from the Visual Studio Manage Extensions dialog box

Follow these steps to install the Syncfusion WPF extensions through the Visual Studio Manage Extensions dialog box:

  1. Open Visual Studio 2022.
  2. Navigate to Extension ->Manage Extensions.

    Note: If you’re using Visual Studio 2017 or older, you have to navigate to Tools -> Extensions and Updates.

  3. Select the online tab on the left side and search for Syncfusion WPF using the search box.
  4. Select the WPF Extensions -> Syncfusion option from the list and click the Download button.
  5. Close all Visual Studio instances and click Modify in the VSIX installer to install the extension.

Install from the Visual Studio Marketplace

Follow these steps to install the Syncfusion WPF extensions from the Visual Studio Marketplace:

  1. Download the Syncfusion WPF Extensions from the Visual Studio Marketplace.
  2. Close all running Visual Studio instances, if any.
  3. Double-click on the downloaded extension. The VSIX Installer window will open. In it, click the Install button.

How to use the Syncfusion WPF item template

Follow these steps to use Syncfusion WPF item template support:

  1. To integrate Syncfusion WPF item templates into your WPF app, use one of the following options:
    Option1: Right-click on your WPF app in the Solution Explorer window. Select the Add Syncfusion Item  option from the menu.
    Select Add Syncfusion Item in the menuOption 2: In the Visual Studio toolbar, choose Extensions -> Syncfusion –> Essential Studio® for WPF -> Add Syncfusion Item.Choose Extensions -> Syncfusion -> Essential Studio® for WPF -> Add Syncfusion Item

    Note: In Visual Studio 2017 or older versions, the Syncfusion menu is directly in the Visual Studio menu.

  2. The Syncfusion WPF Item Template Gallery window will open.
    Syncfusion WPF Item Template Gallery windowUsing the Syncfusion WPF Item Template, we can add three types of window items. Please refer to the following table for details on how to add each type.

    S.NoWindow typeControlWindow details
    1Select a Default window.
    If the Default window is selected, the Blank control option will not be enabled.
    Select any control.
    Eg., DataGrid
    The Default window item will be added to your app alongside the DataGrid control’s code snippet and features.
    2Select any window except Default.
    Eg., Chromeless Window
    Select a Blank control.The default Chromeless Window item will be added to your app.
    3Select any window except Default.
    Eg., Chromeless Window
    Select any control.
    Eg., DataGrid
    The Chromeless Window item will be added to your app alongside the DataGrid control’s code snippet and features.

    Select any option from the Select Window section to add the required window in your WPF app.
    Select any option from the Select Window

  3. Select the required Syncfusion WPF control from the Select Control section to add it to your app.

    Note: In the Select Control section, the Blank control will be enabled only when a window other than the default is selected from the Select Window section.

  4. Choose the features of the selected control from the Select Features section. These features will be incorporated as code snippets in the XAML files within your WPF app.
  5. Choose an assembly reference option—GAC, Installed Location, or NuGet—to specify where the required Syncfusion assemblies need to be added from.

    Note: The Installed Location and GAC options will be displayed only when the Syncfusion Essential WPF build is installed. If the Syncfusion Essential WPF build is not installed, you can only use the NuGet option. When using the Syncfusion WPF window in a .NET Core app, the GAC option will not be available. By default, the Version dropdown lists only the installed WPF versions.

  6. Provide a name for the selected window.
  7. Click Add. The Adding Files and Assemblies window will open, where you can view the details of the assemblies and files being added to our WPF app.Adding Files and Assemblies window
  8. Click OK to add the selected Syncfusion WPF control into your WPF app with the required Syncfusion assemblies.
    Refer to the following images.
    Add the selected Syncfusion WPF control to WPF app with the required Syncfusion assemblies
    Solution explorer window
  9. A Syncfusion licensing message will be shown if you installed the trial setup or NuGet packages because Syncfusion introduced a licensing system in the 2018 Volume 2 (v16.2.0.41) Essential Studio® release. Click the help topic link for information on generating and registering the Syncfusion license key in your project. Refer to our blog on licensing to learn more.
    Syncfusion licensing message

How to run the Syncfusion WPF Window

Follow these steps to run the application with the created Syncfusion WPF control:

  1. Open the App.xaml file in your WPF app.
  2. Change the StartupUri attribute value to WindowName.xaml. For Example, if the added control name is DataGrid1, then change the value to DataGrid1.xaml as shown in the following markup.
    Change the StartupUri attribute value to WindowName.xaml
  3. Now, run the app. The added Syncfusion WPF window will open in your app.

Conclusion

Thanks for reading! In this blog, we have seen how to install the Syncfusion WPF extensions and add a WPF window with the new WPF item template support for Visual Studio. For more information, refer to our adding Syncfusion window to WPF app documentation. This feature is available in our 2021 Volume 1 release. You can also check out other new WPF features in our Release Notes and What’s New pages.

The Syncfusion WPF controls include over 100 modern UI controls for building beautiful, high-performance line-of-business WPF applications. Use them to boost your application development speed.

If you aren’t a Syncfusion customer yet, you can try our 30-day free trial to check out our wares. Also, we encourage you to try our samples available at this GitHub location.

If you wish to send us feedback, please use the comments section below. If you would like to submit any questions, please feel free to contact us through our support forum, support portal, or feedback portal. We are always happy to assist you!

Related blogs

Be the first to get updates

Abishake Dakshinamoorthy

Meet the Author

Abishake Dakshinamoorthy

Abishake Dakshinamoorthy is Software Engineer in Syncfusion. He has been .NET developer since 2018. He is currently working with Visual Studio extensions and Visual Studio for Mac extensions and helps configure the Syncfusion component in applications