I am planning on using Iocomp plot for very high speed plotting functions in my WPF application. The issue is that Iocomp components are purely winforms based and I have not been able to integrate it at all with WPF. Any pointers on the same would be great.
Related
I'm trying to use Surface Toolkit controls on WPF controls in a WPF Control Library. I'm using these controls in a MFC front using HwndSource. All of that is fine. The problem I have is that now I get the following exception:
A System.Windows.Application is required. Please initialize an Application before using this API.
at Microsoft.Surface.Presentation.SurfaceMetrics..ctor()
at Microsoft.Surface.Presentation.SurfaceMetrics.get_Instance()
at Microsoft.Surface.Presentation.DefaultColorSource..ctor(Int32 rank)
at Microsoft.Surface.Presentation.SurfaceColors..ctor()
at Microsoft.Surface.Presentation.SurfaceColors.EnsureInstance()
at Microsoft.Surface.Presentation.SurfaceColors.get_ControlForegroundBrushKey()
The solution was to new up an instance of System.Windows.Application in my MFC application. That pacified the Surface Toolkit.
See the answer here for my complete WPF in MFC solution. It's pretty marvelous, I have to say. Way better than it was in the old days.
I am abit confused about interoperations between forms. I have an c#.Net application developed using DevExforms. On the other hand I have a XNA application which I want to use it as 3d GUI. But it is diffucult to interact between them. Of course it is not useful, it is ugly too.
So I see a way to develop 3d model viewer app using WPF but WPF controls and windows forms controls needs .Net Framework 4.5 to interact betwwen. But I must use VS2010.
So I am confused. What must I do. How can I easily develop a 3d app with Windows Forms or how can i interact any platform with my app. Actualy if you were me what will you do?
WPF controls and WinForms controls don't need .Net framework 4.5 to work together. the interoperability exists before (4.5). take a look in MSDN
I'm needing a TreeView control in our surface application. Situation is ive already created a TreeView implementation using infragistics XamlDataTree. Im wondering whether this control set can be used in a Surface application (being that it is a WPF app under the hood)?
Question also in general can you reuse standard WPF controls in the surface environment?
Also is there a tool already in the Surface SDK suite that would suit a TreeView style layout?
Thanks in advance
Don't know about the XamlDataTree, but in general, you can use any WPF control in a Surface Presentation Layer Application.
I want to implement UI for stock charting application. (I already have an engine working which will provide the data for the UI - the engine is in C#).
The app will update charts in real time as stock price change (candlestick charts, bar charts, line charts etc..).
I wanted to know what technology will suit best for my requirement: WinForms or WPF?
If you're doing greenfield application development I would probably suggest WPF to WinForms.
Pros:
Less code and better separation: with WPF supporting bindings instead of having to write the app following the MVC pattern with the Controller layer being thick, you can create it following the MVVM pattern, having a relatively lightweight ViewModel
Easy to reuse almost all of the code you write and port to Silverlight or Windows Phone 7 later down the way. Porting Windows Forms code to the web or mobile is much more painful
More charting libraries actively developed for WPF: there are a handful of vendors providing and constantly updating their charting libraries for WPF. Vendors include Visiblox Charts (see an example trading application in Silverlight - should be the same in WPF due to ease of porting of code), Telerik RadChart and Infragristics xamChart
Cons:
Speed might be an issue - with GDI you can render tens of thousands of points on screen and animate them seamlessly, this gets slower in WPF. (Though it seems WPF / Silverlight is getting better at this: see the zooming functionality of a Silverlight chart with 6000 points onscreen)
Without knowing more about your requirements, I'd say you'll be fine with either. However, it may be worth knowing that thirdparty control vendors appear to focus more on their xaml controls than their older Winforms ones nowadays.
For example, you might want to use Infragistics's XamDataChart which is quite a bit fancier and has more finance charting features than their older WinChart (I'm sure the same is true for Xceed's and Telerik's equivalents and am not pushing Infragistics in particular.)
The WPF toolkit (http://wpf.codeplex.com/) has charting already built into it, you just need to plug-in the data (which you already have). It has full support for all sorts of graphs, not to mention animations and custom styling.
We have a existing applicaiton in winform .net. It has a form which displays a kind of flow chart diagram. Now we want to create a control which has enhanced graphics to display this flow chart. With my limited knowledge on wpf, is it possible -
Create a graphics control in wpf which is display the flow chart
Integrate this control to exisiting winform application.
The diagram should have user interation, like moving blocks in the chart.
Is wpf a better solution ?
Thanks.
it is possible to integrate WPF into Winform tutorial here.
With regards to actually creating a flow chart and making it interact with your existing Winform can have its own challenges. Keep in mind that WPF is a very powerful tool so you should consider moving over to WPF if you have the man-power and resources to do so.
Also look into the Model-View-ViewModel design pattern for WPF and you cannot go wrong. Good luck.