I’m finishing up a XamChart control. The data points are created on the fly as a behavior attached to a XamDataGrid. When the “active” record in the data grid changes, my behavior updates the chart to show the new record. The binding is two-way on the data points so that the user can drag a data point thereby updating the XamDataGrid’s values.
Still with me?
More complications.
Some of the data points can be edited, while others cannot.
By default, all of my markers are set to none. This makes it hard to figure out if a data point can be dragged aka edited and it makes it hard to actually grad the point because it is so small. To complicate matters, the existing style has animations.
Challenges:
- Find the existing Marker1 style in the resource.
- Assign separate styles based upon editablility.
- Make it easier to grab an editable data point.
Read more…
In a side-by-side comparison, WPF will ALWAYS be slower to load than WinForms. It’s a fact of life for the moment. When using an Infragistics XamDataGrid, the start up lag is very noticeable. This issue is one of our users biggest complaints. “It takes too long to load”
Yesterday, I learned that Infragistics uses a Just-In-Time model for loading their methods. This adds to the delay when loading a XamDataGrid. I also found code to pre-load the methods. I added the method to my App.xaml.cs code. The idea being to start the pre-load as quickly as possible. When I launch my app 14,000+ methods can be preloaded.
According to the discussion on the Infragistics forum, pre-loading can reduce load time up to 3 fold. Your results may vary…
Below is the preload code (tweaked) with a link to the original source. The code is from the sample project (XamDataGrid_PerformanceLoading.zip). Download and extract it if you’d like to see the original version.
Read more…
Assumptions:
- XamDataGrid
- Attached property used to capture the MouseDoubleClick event
private static void MouseDoubleClickHandler(object sender, MouseButtonEventArgs e)
{
var sourceParent = VisualTreeHelper.GetParent((DependencyObject)e.OriginalSource);
if (sourceParent is RepeatButton) // eject if double click in scrollbar
return;
...
}
What? Why could you possibly need that?!?
Let me explain. I’ve got a Infragistics XamDatGrid with lots of data in it. I’ve also got a XamChart that displays the selected row in the grid. On start-up, nothing is selected in the datagrid so my active data item is null.
So what’s the problem?
The problem is when there is no data bound to the chart, it “helps” by showing you the default data sample. My users find this confusing and distracting, especially when our chart type does match Infragistics choice.
So how to fix it?
I’ve seen some comments on the Infragistics forums with solutions to override this behavior. But why bother? Wouldn’t it be simpler to hide the chart when there is no bound data instead of writing a bunch of code to load in a default/empty data set?
Here’s my solution:
Read more…
I am struggling a bit with ths topic: “Ramping up.”
Wednesday, I forgot my phone, glasses, and external hard drive.
Thursday, I forgot my phone and wallet.
Today, I remembered everything but I found an issue in the latest release in the Infragistics WPF controls so I’m wallowing a bit trying to decide if I should work around the issue for the moment or plow straight through.
So I am having a bit of trouble ramping up as it were. Read more…