I've created a simple application with wpf, and noticed a strange behavior: the Application has two buttons, with unrelated and very simple behaviors. Whenever I launch it, the first click of any of the buttons takes two to three seconds to complete. Only the first click is slow. Subsequent clicks are almost immediate, as expected for their simple behaviour. I've searched google and SO, but nobody seems to be experiencing the same problem.
the details of the application are:
NorthWind db on SQL server 2008;
Linq to SQL auto generated classes;
Customers
Table as a DataGrid;
Button 1 OnClick
Event: Context.SubmitChanges()
;
Button 2 Onclick
Event alternates a boolean DependencyProperty on the MainWindow
class.
As you can see, the setup is very simple. If every single click of the buttons was slow, I would have attributed them to WPF performance issues. What is strange is that whenever I launch it, only the first click responds slowly, and others are normal.
Just to get this question off the unanswered list, here are my findings: this is a known issue with the gesture capture of IntelliTrace. Turning off the gesture capture (Tools>->Options->IntelliTrace->IntelliTrace Events) makes the problem go away completely. More details can be found in this answer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With