Using DataGrid.Contrib with .NET 4/VS 2010

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 14 years ago by Phil Devaney - Senior Software Engineer, Serck Controls Ltd
Version: 9.1.0507
Avatar
I've been trying to build my project with .NET 4/VS 2010, and one of the things I did was remove the reference to WPFToolkit.dll and use the version of DataGrid that's now in PresentationFramework.dll in v4. However, I also had to remove the reference to DataGrid.Contrib as it was giving the following error:

error MC1000: Unknown build error, 'Cannot resolve dependency to assembly 'WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Line 76 Position 70.'

Removing the reference and changing my ThemedDataGrid to a normal one fixed the problem. I expect there is a similar problem with the DataGrid.Interop assembly.

Are you planning on releasing a new build that supports .NET 4 in the near future. If not, I guess I can grab the source and fix it myself. This isn't an urgent matter, as MS "Oslo" is also incompatible with .NET 4.0, so I have to wait for the next CTP of that, supposedly due out in time for PDC in a couple of weeks

Comments (11)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Phil,

Correct, since both our assemblies target the toolkit version of the grid, that won't work. You can grab the source code off CodePlex and what we will do for the 2009.2 release is to also add our DataGrid.Interop source code to the CodePlex project. This way you'll be able to compile either one against the .NET 4.0 grid.

We may also look into making a .NET 4 beta version of those assemblies but I can't yet confirm if that will be out before .NET 4 RTM's or not.


Actipro Software Support

Posted 14 years ago by Phil Devaney - Senior Software Engineer, Serck Controls Ltd
Avatar
Hi,

Thought you might like to know I have successfully converted this assembly to .NET 4. It was relatively straight forward, though there were a couple of minor issues. In case anyone wants to do this, here are the steps I took:

1. Open the WPF.Contrib solution in VS 2010 and let the upgrade wizard run.
2. In the project properties, change the targeted framework to .NET 4.0
3. In the project properties, change the target assembly name to ActiproSoftware.DataGrid.Contrib.Wpf40
4. The project included a relative project reference to ..\Shared\Shared.csproj. I had to change this to an absolute assembly reference to ActiproSoftware.Shared.Wpf30
5. Remove all XAML namespace references to http://schemas.microsoft.com/wpf/2008/toolkit
6. The class DataGridHeaderBorder is now in Microsoft.Windows.Themes so the style that references this in Common.xaml will need to be moved to the theme-specific dictionaries. As a workaround, I hard-coded a reference to M.W.T in PresentationFramework.Aero
7. Changed any refences to Microsoft.Windows.Controls in code to System.Windows.Controls (and child namespaces)

This all seems to work OK. Unfortunately, I now have a different problem, in that the changes in the Nov CTP of Oslo (now called SQL Server Modelling Services) mean that ActiproSoftware.Text.Addons.Dataflow.Oslo10.dll no longer work :( In particular, the DynamicParser class has been replaced by Parser.

Phil
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Phil,

Thanks for the post.

In regards to Oslo, we are going to try and get it updated for the first WPF Studio 2009.2 release but if it doesn't make the cut (we have a ton of SyntaxEditor updates for that version), then we'll get to it in a maintenance release after.


Actipro Software Support

Posted 14 years ago by JDEV
Avatar
Hi,

Any update on when we can get Editors.Interop.DataGrid for .NET4 (using the built in DataGrid instead of Toolkit DataGrid)?

Thanks.
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

We will probably open-source the Editors/DataGrid (Interop) assembly, so you can rebuild it to target the DataGrid in .NET 4. Unfortunately, this will have to wait until next week, but we'll let you know what we do.


Actipro Software Support

Posted 14 years ago by Markus Springweiler
Avatar
Where can I download this?
Posted 14 years ago by Phil Devaney - Senior Software Engineer, Serck Controls Ltd
Avatar
The DataGrid.Contrib source can be downloaded from http://actipro.codeplex.com/. Unfortunately the Editors.Interop.Datagrid source hasn't been uploaded yet - can we get an update on this?

I'd also appreciate an update on when a version of Text.Addons.Dataflow.Oslo compatible with the Nov 09 R3 CTP of SQL Server Modeling (http://www.microsoft.com/downloads/details.aspx?FamilyID=29e4ead0-fd81-42ba-862b-f3589378466a) will be released.

[Modified at 05/18/2010 08:26 AM]
Posted 14 years ago by Markus Springweiler
Avatar
Quote:
this will have to wait until next week


If my holiday weeks would be that long ;-)
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi all,

Sorry we haven't added Editors.Interop.Datagrid to the Codeplex project just yet. We've been tied up trying to get the Silverlight controls finished. I'll bump this up on the priority list to try and get it out this week sometime.

Phil, the SyntaxEditor for Silverlight port has prevented us from working on the MGrammar updates as well. However we'll try to start looking at that again soon. There are a number of breaking changes Microsoft made in recent CTPs that prevent what we were doing from working so we need to try and find alternate ways of doing things with their newer object model.


Actipro Software Support

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We've open-sourced Editors.Interop.Datagrid in our Codeplex project at:
http://actipro.codeplex.com/

It's live now.


Actipro Software Support

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Phil,

Just a quick note to let you know we'll have our add-on updated for the latest SQL Server Modeling CTP in the next WPF Studio maintenance release.


Actipro Software Support

The latest build of this product (v24.1.2) was released 3 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.