Completed
Last Updated: 25 Nov 2019 08:15 by ADMIN
Release LIB 2019.3.1125 (11/25/2019)
Currently, even if the TouchManager.IsTouchEnabled property is set to False, we are still subscribing to touch events. We should provide an option to entirely disable the TouchManager.
Completed
Last Updated: 19 Jan 2023 14:50 by ADMIN

Subscribing to touch manager events is setting the Stylus.IsPressAndHoldEnabled attached property on the associated element to False. However, the property is not set back to True, after you remove the TouchManager event handlers from the element. Therefore, the default tap and hold action that displays the rectangular shape over the element is no longer executed.

To work this around set the Stylus.IsPressAndHoldEnabled attached property manually.

DragDropManager.RemoveDragInitializeHandler(element, OnDragInitialized);
Stylus.SetIsPressAndHoldEnabled(element, true);

In Development
Last Updated: 15 Nov 2024 13:33 by ADMIN

The exception occurs when publishing .NET 9 application and the "Deployment Mode" in the "Publish profile" is set to "Self-contained".

The exception is not displayed, but instead the application crashes at startup and it seems like it cannot start at all. You can see the error in the Events Viewer tool of the Windows OS, after you navigate to the "Windows Logs-->Application" menu.

This is not reproducible in .NET 8.

The original stacktrace where this was hit is the following:

 

System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
File name: 'System.Windows.Forms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
   at Telerik.Windows.Input.Touch.TouchManager.InitializeProperties()
   at Telerik.Windows.Input.Touch.TouchManager.RemoveTapHoldAndReleaseEventHandler(UIElement element, TouchEventHandler handler)
   at Telerik.Windows.Controls.RadContextMenu.AttachHandler(UIElement element)
   at Telerik.Windows.Controls.RadContextMenu.CreateReferences(UIElement element)

 

To work this around, you can try one of the following ideas:

  • Change the target framework of your project to .NET 8 or earlier.
  • Use the "Framework-dependent" Deployment mode in the Publish profile.
  • Add a reference to the C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\9.0.0\System.Windows.Forms.dll file in your project.