Hi, if you download the Managed SDK (C#) you will find there lots of examples that contain Blend WPF projects sharing all the contents with projects using Noesis for different platforms.
To convert an existing WPF project to Noesis the steps would be:
1. Create a project for the desired platform
- Windows -> .NET 4.61, .NetCore, Forms...
- UWP -------> UWP 10.0.16299 (min)
- Android --> Xamarin.Android
- iOS ---------> Xamarin.iOS
- macOS ----> Xamarin.Mac, .NetCore
- Linux ------> Mono, .NetCore
2. Install from NuGet the appropriate Noesis Display and RenderContext packages for each platform.
- Windows -> Noesis.App.Displays.Win32, Noesis.App.RenderContexts.D3D11
- UWP -------> Noesis.App.Displays.WinRT, Noesis.App.RenderContexts.D3D11
- Android --> Noesis.App.Displays.Android, Noesis.App.RenderContexts.EGL
- iOS ---------> Noesis.App.Displays.UIKit, Noesis.App.RenderContexts.MTL
- macOS ----> Noesis.App.Displays.AppKit, Noesis.App.RenderContexts.MTL
- Linux ------> Noesis.App.Displays.X11, Noesis.App.RenderContexts.GLX
3. Create application entry point code. You can copy App.cs from our samples and adapt it to your needs. For example, the code for a windows application would look like this:
using System;
using NoesisApp;
namespace Buttons
{
partial class App : Application
{
protected override Display CreateDisplay() { return new Win32Display(); }
protected override RenderContext CreateRenderContext() { return new RenderContextD3D11(); }
[STAThread]
static void Main()
{
App app = new App() { Uri = "App.xaml" };
app.Run();
}
}
}
4. Adjust WPF-Noesis code differences using conditional compilation symbols:
#if NOESIS
using Noesis;
using NoesisApp;
#else
using System;
using System.Windows;
using System.Windows.Controls;
#endif
namespace Buttons
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
this.Initialized += OnInitialized;
this.InitializeComponent();
}
#if NOESIS
private void InitializeComponent()
{
Noesis.GUI.LoadComponent(this, "MainWindow.xaml");
}
#endif
private void OnInitialized(object sender, EventArgs args)
{
this.DataContext = new ViewModel();
}
}
}
5. Set xaml files and other resources Build Action to "Embedded Resource" if you are using the
default application resource providers. You can also use
Local providers that search for resources in the local directory, or even create your own.
To simplify this process we have plans to create Visual Studio project templates that will do steps 1 to 3 automatically, and we also want to be able to generate InitializeComponent code-behind for controls, so named elements and events are automatically connected.
Please let us know if you need further assistance.