CommunityToolkit / Microsoft.Toolkit.Win32

ARCHIVE - This repository contained XAML Islands wrapper controls and tooling for XAML Islands with WinUI 2, see readme for more info about XAML Islands with WinUI 3 and the WindowsAppSDK.
https://aka.ms/windowsappsdk
Other
384 stars 89 forks source link

InkCanvas not able to be used at WinForm Application #349

Open mortiii opened 2 years ago

mortiii commented 2 years ago

Describe the bug

It seems to be impossible to use InkCanvas in my Windows Forms Application although it's targeted at .NET Core 3.1 or .NET Framework 4.8.

Steps to Reproduce

Steps to reproduce the behavior:

  1. i created Winform App .Net Core 3.1 or .NET Framework 4.8
  2. installed NuGet packages Microsoft.Toolkit.Forms.UI.Controls and Microsoft.Toolkit.Forms.UI.XamlHost
  3. i tried to drag drop any control (ink canvas, xamlhost,...) to the form and it fires following message... errormsg1 errormsg2

Expected behavior

am i wrong or should this work? Is there any actual demo project?

Environment

NuGet Package(s): nugets Project .NET Version:

ghost commented 2 years ago

Hello mortiii, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

michalleptuch commented 2 years ago

Could you share your code?

mortiii commented 2 years ago

InkControls.zip

michalleptuch commented 2 years ago

I prefer to use solution with custom controls hosted by WindowsXamlHost control: https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/host-custom-control-with-xaml-islands.

Your code doesn't work for me too, but I think it may be incomplete.

mortiii commented 2 years ago

So there isnt someone with an working example project?