09-17-2012 10:18 PM
I suppose this is a common problem.
What I want to achieve is this:
I want to do my User Interface design in C# WPF, instead of the LabWindows/CVI (*.uir), which is cumbersome and not user-friendly.
say a simple slider in C# WPF, how can a LabWindows/CVI program able to access and set those variables in C# WPF slider?
do we need to create some sort of wrapper for it? Is the .NET Library useful for this purpose?
can we have some demo to test it out?
thanks.
09-18-2012 02:20 AM
Hi,
I am not too familiar with C# and CVI cooperation but maybe it is better idea to to separate C#UI and CVI code to different project.
What i mean is.Compile one of them to library(DLL or something in C#) and then use one from other by some well defined API.
I think this is better idea than mix lot of functions call from two different runtimes(C# and CVI)
There is sample already shipped/instaled with CVI, some of this is about call .net function from CVI.
You can also create your own wraper library from CVI menu Tools>Create .Net controler.Check the help file.
P.S. personaly, i like the CVI UI, and UI editor too.
09-18-2012 03:03 AM
Hi TTH,
It is unfortunately not possible to host .NET Controls in the CVI UI. R&D seem to be working on doing that possible in the future but there is no release date for this feature. Ina ddition, the ActiveX Container in LabWindows/CVI does not support hosting .NET controls using COM Interop.
Best regards
09-19-2012 03:38 AM
If you chose WPF as front end, why not chose c# with measurement studio as back end instead of CVI?
09-24-2012 03:32 PM
I am wondering exactly which user interface controls are available in C# which are not available in CVI.
09-25-2012 03:06 PM
Another option to consider is to use network variables to communicate between your C# program and the CVI program. Perhaps the WPF C# program contains the UI and then sends that information to the CVI application to process. CVI could even then send back processed information via network variables to the WPF UI for display purposes.
Just a thought.