Harmonizing Powerhouses: Syncfusion WPF Controls Are Now Compatible with Avalonia XPF
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (175).NET Core  (29).NET MAUI  (208)Angular  (109)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (41)Black Friday Deal  (1)Blazor  (220)BoldSign  (15)DocIO  (24)Essential JS 2  (107)Essential Studio  (200)File Formats  (67)Flutter  (133)JavaScript  (221)Microsoft  (119)PDF  (81)Python  (1)React  (101)Streamlit  (1)Succinctly series  (131)Syncfusion  (920)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (51)Windows Forms  (61)WinUI  (68)WPF  (159)Xamarin  (161)XlsIO  (37)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (151)Chart  (132)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (633)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (41)Extensions  (22)File Manager  (7)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (508)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (11)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (387)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (597)What's new  (333)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Syncfusion WPF Controls Are Now Compatible with Avalonia XPF

Harmonizing Powerhouses: Syncfusion WPF Controls Are Now Compatible with Avalonia XPF

TLDR: Syncfusion WPF Controls now support Avalonia XPF, enabling seamless cross-platform development. Learn to integrate controls, update SDK, add package sources, include the license key, and run apps on Windows, Linux, and macOS.

In the dynamic landscape of cross-platform development, choosing compatible tools and frameworks can be a game-changer for developers. We’re happy to announce that Syncfusion WPF controls are now compatible with Avalonia XPF!

 Avalonia XPF is a cross-platform WPF framework. It is supported in major platforms, including Windows, macOS, and Linux (desktop and embedded). Support in WebAssembly, iOS, and Android will be available in 2024.

The Syncfusion WPF control suite is a package of over 90 modern WPF UI controls, 50+ WPF charts, and a collection of document processing libraries that lets developers build beautiful, high-performance line-of-business WPF apps. Combining the power of Avalonia XPF with Syncfusion WPF apps opens up new dimensions for developers.

In this blog, we’ll explore the intricacies of achieving compatibility between Syncfusion WPF controls and Avalonia XPF, providing developers with the ability to leverage the strengths of both frameworks.

Avalonia XPF – A cross-platform gem

Avalonia XPF’s robust architecture and XAML-based markup offer a development experience similar to WPF and Xamarin. The framework’s support for styling, theming, and native interop makes it an enticing choice for developers wanting to target multiple platforms without compromising the user experience.

Integrating Syncfusion WPF controls with Avalonia XPF

Follow these steps to create an app with Syncfusion WPF controls and Avalonia XPF. We’re going to use the Syncfusion WPF DataGrid control for demo purposes.

Step 1: Create a WPF application using Visual Studio with .NET 7.0(Standard Term Support).

Note: Avalonia XPF supports .NET 6 and higher versions.

Step 2: Create or modify the existing NuGet.config file to include the following necessary package sources.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <packageSources>
  <clear />
   <add key="api.nuget.org" value=https://api.nuget.org/v3/index.json />
   <add key="xpf" value=https://xpf-nuget-feed.avaloniaui.net/v3/index.json />
   <add key="avalonia-nightly" value=https://nuget-feed-nightly.avaloniaui.net/v3/index.json />
 </packageSources>
 <packageSourceCredentials>
  <xpf>
   <add key="Username" value="Enter the Username" />
   <add key="ClearTextPassword" value="Enter the Password" />
  </xpf>
 </packageSourceCredentials>
</configuration>

Note: Kindly use the credentials given by Avalonia XPF.

Step 3: Update the SDK in your WPF project to use the XPF SDK in the .csproj file. Refer to the following code.

<Project Sdk="Microsoft.NET.Sdk"> to <Project Sdk="Xpf.Sdk/1.0.1-cibuild001295>

Step 4: Include the required license key in the .csproj file.

<PropertyGroup>
 <EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>

<ItemGroup>
 <RuntimeHostConfigurationOption Include="AvaloniaUI.Xpf.LicenseKey" Value="Enter the LicenseKey" />
</ItemGroup>

Note: Kindly use the license key from Avalonia XPF.

Step 5: Then, clean the existing build artifacts using any one of the following methods:

  • Run the command dotnet clean from the command prompt.
  • Use the Build -> Clean Solution option in your project.
  • Delete your bin/obj directories manually.

Step 6: Ensure the output type in the .csproj file is set to WinExe.

(E.g., <OutputType>WinExe</OutputType>).

Let’s see how to run the created WPF app on various platforms.

To run the app in Windows OS

Follow these steps to run the created WPF app in a Windows environment:

Step 1: Open the WPF app in Visual Studio.

Step 2: Click the Debug menu.

Step 3: Select Start Debugging to run the app.

Now, it will run the WPF app properly on Windows.

Steps to run the WPF app in Linux OS or macOS

Prerequisites to run the app on macOS

  • Access to a Mac machine (either physical or via remote access).
  • .NET 7 SDK
  • Visual Studio Code or JetBrains Rider (JetBrains works similarly to Visual Studio. If you don’t have the required license, you can use Visual Studio Code.)

For Visual Studio Code, ensure the following extensions are installed:

Let’s follow these steps to run the app on Linux or macOS:

Step 1: Choose a Linux (preferably Ubuntu)/MacOS machine.

Step 2: Then, open Visual Studio Code or JetBrains Rider.

Step 3: Click File-> open Folder to browse and select the WPF app created using Avalonia XPF, SfDataGridDemo.

Step 4: Right-click the project file and choose Debug from the context menu. Refer to the following image.Select Debug option

Step 5: Click Start New Instance to run the app.Choose Start New Instance option

Now, the app will run properly on Linux OS or macOS.

Refer to the following output image.Uniting Syncfusion WPF Controls with Avalonia XPF

GitHub reference

For more details, refer to the Avalonia XPF Compatibility with Syncfusion WPF DataGrid GitHub demo .

Conclusion

Thanks for reading! This blog delved into the exciting new compatibility between Syncfusion WPF controls and Avalonia XPF, opening up a world of possibilities for cross-platform development on Windows, Linux, and macOS. By integrating these powerful frameworks, developers can craft versatile, high-performance apps with minimal configuration.

We encourage you to follow the steps provided in this blog and share your feedback in the comments section below.

If you need assistance, please do not hesitate to contact us through our support forumsupport portal, or feedback portal. We are always ready and willing to help you!

Relate blogs

Tags:

Share this post:

Comments (2)

Any chance of supporting Avalonia directly (without XPF) ? Avalonia is closer to Flutter in design than MAUI, has more platforms and appears to be more stable.

Gayathri Ramalingam
Gayathri Ramalingam

Hi ANDREW,

At the moment, we don’t have plans to support Avalonia UI framework directly. However, we’ll keep an eye on its popularity, user adoption, and requests. Depending on these factors, we may consider it in the future.

Regards,
Gayathri R

Comments are closed.

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed