Hi A whole back I received some graet helpl on this forum which involved using Microsoft.Xaml.behaviors DLL with xamDataGrid to allow me to use Enter, up, down, left and right arrows keys when entering into a grid. This included moving down to the cell immediately below the current cell when a value is entered and the ENTER key is pressed. (Why is this not default behaviour anyway?)
This works fine, except the solution takes around 10 seconds out of 20 to 30 seconds at startup to load Microsoft.Xaml.behaviors
I have checked with Microsoft and written small test applciation which do not use IG controls, and Microsoft.Xaml.behaviors loads instantly.
Is there any way I can improve the startup time when loading the application.
It is installed in memory with native compile but that didn't make any difference. I can see how long it takes to lead each control in the output window in VS, and this one takes by far the longest
Any help or pointers would be greatly appreciated, including alternative solutions which don;t use the monster that Microsoft.Xaml.behaviors seems to be when used in an IG application
Hello Gordon,
My team and I have done an initial review of this post, and I cannot think of any reason that the Microsoft.Xaml.Behaviors assembly would load slower due to anything happening in Infragistics code. This is very likely happening due to something expensive happening within that assembly, or perhaps some sort of interaction with the debugger? Does this slowness happen if you are running your application in release mode – that is, without the debugger?
I would also be curious to know what happens when you profile the application at startup, as this might be able to narrow down where exactly the performance bottleneck is when loading the Microsoft.Xaml.Behaviors assembly. Have you tried this? Can you please provide some additional information on where much of the time is being spent?
Regarding a possible alternative, it depends on the objects that you are using within the Microsoft.Xaml.Behaviors, but you may be able to use the System.Windows.Interactivity.Wpf NuGet package within your application instead. This will include the System.Windows.Interactivity assembly that contains the Behavior object.
Please let me know if you have any other questions or concerns on this matter.
It happens in production with a release build too.
We (the guy who helped me on the forum at the time) tried using System.Windows.Interactivity.Wpf but that didn;t give the required functionality.
How do you suggest I profile the application at startup?
Thank you for confirming that this issue happens with a release build as well. This rules out any debugger-specific issues.
Would it be possible for you to please provide some further information on what required functionality is missing in System.Windows.Interactivity.Wpf that you are using in this case?
Regarding profiling your application at startup, any performance profiling application would work for this, and recent versions of Visual Studio include this built-in. In Visual Studio 2019 Preview, you can access this by going into the Debug menu and selecting Performance Profiler.