C# Charting Library - c#

I've been looking for a good cross-platform charting library to use on a .NET project intended to be run on both Windows and Linux, but everything looks to have a dependency on WinForms controls, seemingly including ZedGraph (not to mention that ZedGraph looks a bit, well, dated).
Microsoft's Chart Controls for WinForms/ASP.NET look great, but like I said, have a dependency on WinForms controls. I know Mono includes WinForms support for Linux, but I'd rather not have to have Linux end-users install WinForms for what's going to end up being a GTK# application.
Does anyone know of any .NET charting library out there that don't depend on WinForms and that has good visual appeal?
P.S. As an example of a nice visual style, on a different PHP-based project, we use pChart (which I would link, but I don't have enough rep for it).
P.P.S. I've thought about using the Google Chart API, but I don't want to require a network connection just to generate charts.

They require Windows.Forms, since GDI (graphics) functions reside in that particular library. Any other chart control will have to use either 3rd party library or provide its own graphics toolkit.
The best thing I could find is Apache FOP:
http://xmlgraphics.apache.org/fop/
You should be able to run it from command line, or integrate it using IKVM.
Finally, why don't you want Windows.Forms library? As far as I know, mono provides a sufficiently working one.

Related

Make ToolBar look like Windows Vista/7 instead of classic

I want to make my application look more like a native app than a .NET app and I use .NET because of Visual Designer and C#.
I've seen some native apps using a toolbar that looks very similar to Vista/7 menus.
Check out the example:
Some native apps like Notepad++, Codeblocks, etc. uses the same Vista/7 style for toolbars. How can I do the same in C#? I know P/Invoke, so, I need to know the methods to be used or an example.
I don't use ToolBarStrip, I use ToolBar because of the nativeness. What P/Invoke can I use for make the Toolbar look like the above image (Vista/7 look)?
EDIT: Based on this question, I need to do the same in P/Invoke instead of Win32.
Notepad++ uses both versions of the native toolbar controls in its source code. I'd assume it chooses between the two based on the Windows version. You already tried the .NET wrapper for the legacy one (ToolBar class) so that's probably not the one you like.
The other one is the more recent Rebar control, also known as "Coolbar". Beware that its look-and-feel depends on the Windows version so don't go off the (dated) screenshots in the linked MSDN article. There is no official .NET wrapper for it, but programmers has written some. There is a Codeproject.com project that proposes one, I don't normally recommend any such projects but you sound quite capable of getting the bugs out.
I see that the windows vista toolbar has fade settings applied which is easier to do with brushes in Xaml.
However here is a downloadable theme in codeproject that you can reference on how it is done there.
https://www.codeproject.com/Articles/18858/Fully-themed-Windows-Vista-Controls

Using WPF dll's in UWP app

I'm writing a UWP app, and for some reason I'm unable to reference PresentationFramework.dll. It contains some WPF controls I want to use (specifically, System.Windows.Controls.DataGrid, but they aren't available under Universal Windows >> Extensions in the reference manager. Why is this, and how can I fix it?
TL;DR: You can't use WPF controls in UWP.
WPF and UWP are two totally different APIs with a different .NET framework. While WPF has access to the full .NET Framework, UWP has a much more limited API. If you want to read more on the different platforms and compilers, this msdn blog post is a good entry point.
You are thus unable to add any standard dlls as a reference to an UWP app. If you want to share code between WPF and UWP, you'll have to use a Portable Class Library, in which you target the platforms you need.
And as the XAML namespaces for WPF and UWP are different as well, you won't find many portable controls. So for UWP development you'll need to use UWP controls (equivalent to their WPF counterparts). Bonus tip: if you're looking for 3rd party controls, you can also look for 'winrt' controls as winrt was used for Windows 8/8.1, but it's the same technology.
I know this is an old question. Not even going to research what came out when. There is a DataGrid for UWP as part of the community toolkit:
https://learn.microsoft.com/en-us/windows/communitytoolkit/controls/datagrid
It's really frustrating though, because it doesn't seem to do a few things that the WPF version does, and these are the few things I needed it do do.
Microsoft really needs to come up with a new naming conventions for its 114 different frameworks and platforms. Controls should be named DataGridWpf, DataGridUwp, etc.
It's super hard to search for examples of the UWP DataGrid control and find thousands of examples for the WPF version. Just my two cents. And for the record, it seems like there are about 5 active links to examples on the UWP version. Arrg.
/And for added fun, Telerik and DevExpress have UWP data grid controls, which they also call DataGrids.

Qt with C#/.NET in Visual Studio v.09?

Do any of you have any experience working with Qt and C# in Visual Studio? Is it at all possible/easy to use together? I've searched for C# bindings for Qt, but all projects seem to have been abandoned.
I'm doing an application which must be coded in C#, which also needs to be able to run on Ubuntu (with Mono). So, Qt was the first thing that came to mind.
The Qyoto project seems to be the way to go, and it seems to be still active. I don't have experience with it though.
Note that if the application is simple (i.e. doesn't use third-party components and no "hacks" to change behaviour), you can also give a simple WinForms application a try, which should run fine on Mono. And, well, if you don't actually need a GUI, you don't need anything except Mono. The Mono project itself, by the way, seems to favor Gtk# over Qt.

How to build UIs like skype

I want to know how can I build UIs like skype using standard .Net/C#. Is it possible at all?
Thanks
You can use Windows Presentation Foundation to build more stylish GUIs than Windows Forms. It's pretty difficult to move from Forms to WPF. You usually need a good design tool, like Expression Blend.
AFAIK skype was built using Qt4, it's rather easy to build custom gui widgets, check
C++ GUI Programming with Qt4, 2nd Edition and this tutorial.
P.S. check this to see how to build qt4 on windows using MSVC 2008.
It might be possible to build such an UI using Windows Forms, but only with a lot of custom control code or a really good component suite. But as Chris said, WPF should be the tool of your choice when you want to use .NET.
Qt4 is a really powerful C++ framework, also powering apps like Google Earth. The Qt SDK, inclduing everything you need to get started (Compiler, IDE, documentation), can be obtained here. It's licensed (among others) under the LGPL.
Windows Presentation Foundation will give you the most flexibility, but it can be hard to use. An alternative to this is Sliverlight - Version 3 is going to be capable of being used outside of the browser (similar to Adobe Air), and in some ways provides an easier development experience. You might want to consider using some third party controls to give you access to nice functionality that you wouldn't get out of box.
To my acknowledge Skype is build with Delphi an a set of third party tools, so it for sure can be done without WPF.
Take a look at the components from DevExpress or TMS.

How to read installer shortcuts with C# (WPF)

Background: I've decided to teach myself C# through WPF, and I'm writing a small application that needs to get a list of Start Menu shortcuts and their targets and store them. Basically, I'm trying to take all the shortcuts and put their target applications' paths into memory. However, I've run into a problem trying to read Windows Installer shortcuts (the ones that point to something like C:\Windows\Installer\{90120000-0030-0000-0000-0000000FF1CE}\wordicon.exe -- Microsoft Office is a good example of this). I did some research and it seems that Windows uses some behind-the-scenes magic involving the Registry to find the actual location of the file.
Question: How can I get the actual target of these Windows Installer shortcuts in C#? A lot of sources I've found point me to the IShellLink interface, but I don't know how to use it with C#. I'd prefer to use Windows API calls (or, even better, a .NET library) instead of manually looking through the Registry, but I'll take any guidance on the issue.
After doing more research, I found an easy answer here. It's basically using a combination of the MsiGetShortcutTarget and MsiGetComponentPath functions of msi.dll.
I'm afraid IShellLink IS the Windows API for using shell links! The Shell API is heavily COM-based.
But the good news is that COM interop works very well in .NET. This site is usually a very good resource:
http://www.pinvoke.net/default.aspx/Interfaces/IShellLinkA.html

Categories

Resources