A good 2D-primitive rendering library for C#/.NET? - c#

I'm developing a C#/.NET application (Winforms/WPF, not entirely decided yet) which needs to display simple diagrams: boxes/"text boxes", lines/arrows, circles, text etc...
Some items on the diagram need to be clickable/selectable, allowing me to display e.g. a dialog for filling in data on the selected item.
I guess the diagram display could all be done from scratch using e.g. GDI+, but before going down that path I would like to ask for input/suggestions on existing libraries to use (commercial or free)?
I've already tried to google for suitable libraries, but found mostly 2D game-engines or "graph/chart"-rendering libraries. Neither seem to fit my requirements.
Best regards,
Søren

Even if you said you looked already into "graph/chart" libraries. What about Nevron Diagram? The only drawback would be that it is not free, but it doesn't cost that much.

I have used Piccolo2D for Java, but they aslo have a .Net version, and it's community driven.
The only problem is, I don't know how updated the .Net version is or give any comment on how well it works (.Net version).

Related

C# Textbox placeholder transition in Windows Form

Is it possible to to these kind of textbox in windows form ? If yes, How? and can you give me a reference of that in order to achieve this. I've been a front end developer before and it's easy to do on web. I think i'm not the only one who want to know these. Thank you
I think to a certain extent you can get above animations but it will not be fast or extremely customizable like WPF here are my recommendations:
Bunifu framework
Syncfusion
Unfortunately both these are paid frameworks. If I do find a stable free framework I will update this answer.
Also Please Read up on more at How good can Winforms make a UI look using free resources only?

Pull to Refresh UWP - Grid view?

Could someone please advise me on the "correct" way of implementing Pull to refresh on UWP?
Below are some examples I've found however I'm not sure which one is using the best approach:
Microsoft sample which is for a ListView - This works however it is specific to the ListView Control
AmazingPullToRefresh is a NuGet package that also works however it is somewhat limited in terms of styling
PullToRefreshUWP_WindowsComposition is another example however it works differently to the other two as it does not use an extension class
Any advice is much appreciated
There is no standard answer for this question, basically, there are two points we need to implement:
Get the offset changes when user pull something on the control
Generate some indicator to notify user
Both XamlPullToRefresh and PullToRefreshUWP_WindowsComposition use the new Windows Composition API: Windows.UI.Composition namespace
Ref Windows.UI.Composition Overview
The API is a powerful supplement to existing frameworks such as XAML
to give developers of UWP applications a familiar C# surface to add to
their application. These APIs can also be used to create DX style
framework-less applications.
Please notice that this API works only on Windows 10.
While AmazingPullToRefresh uses Manipulation API and implement all things by calculating offset changes. A similar implementation can be found here
If you want to implement a cool pull-to-refresh control, I would recommend using the Windows.UI.Composition API. You can get start from here
The functionality of pulling to refresh is not used by microsoft.
Reloading a page / data is something we have still in our mind from thinking apps like a website.
Why not have a synced database and alway update your UI with the data which got changed in your local db? For eg. see firebase.google.com
If you want to implement this feature anyway there is not really a way to go.
I have used the PullToRefresh.UWP library from NuGet. For a tutorial see:
codeproject.com
With some tweaking it works but sometimes when I lift my finger of the screen after pulling down the bar won't go up again.
So the answer is: Sorry, but nobody can give you an answer on how to do this the "correct" way. But is there a correct way anywhere? Like almost always in programming. It depends on the case you will use it.
Hope this will help you.

Desktop Version of Google's Annotated Time Line Component?

I've been using Google's Annotated Time Line Visualization component for the last couple of weeks and I love it! I've been able to make plots with about 10k points without much trouble.
Do you know of a desktop component I could plug into my application that delivers the same WOW factor that Google's component does? I don't care what the language/toolkit is. I prefer C#,Java,Ruby,C++ or Python... (in that order) however any other's would apply. I also prefer it to be free and open source, but if it's not that's OK as well.
Thanks for your time!
Note: This doesn't have to be cross-platform. Windows is fine.
Edit (2009-08-07):
Even if I can only plot 10k points, I am fine with that. I would just like a desktop control that delivers the same "wow" factor and works in a similar manner (zooming, scrolling, annotations, etc) that the Google component does.
Edit (2009-09-03):
I really prefer the language to be C#. I started a bounty to see if anyone can find some good ones. I want it to be almost identical to Google's Annotated Timeline Component. I would use Google's Component, but I want a desktop component... and I don't want to run into performance limitations because of the browser. Using Adobe Air is out of the question.
Edit (2009-09-03):
Do not recommend Visifire. I have evaluated it, and it doesn't support zooming. Remember, it must be very close to Google's component in terms of functionality and "wow" factor.
This WPF-based chart control at codeproject may put you in the right direction. It's got smooth panning/zooming/scrolling :
WPF Chart Control With Pan, Zoom and More By John Stewien
If you're needing to plot millions of points, you're going to run into performance issues quickly if the control doesn't have a mechanism for loading/sampling only what it needs to display. Even then, that's a very large number of data point to want to access in one control.
Hm i am not sure if this is what you are looking for, but for java there is the very good library JFreeChart which is not exactly as interactive as the one you mentioned but it is really easy to use and pretty flexible for you to subclass and tweak to your preference.
Perhaps you could take a look at matplotlib. It's a python based library, however it's very flexible in that it can take it's input from a variety of sources.
An alternative is to embed a web browser control in you wpf application. You'll probably need access to the DOM, so you might have to use the WebBrowser in a WinForm. A good article descibing how this is done can be found here.
Microsoft also has free chart control you can get at http://www.microsoft.com/downloads/details.aspx?FamilyId=130F7986-BF49-4FE5-9CA8-910AE6EA442C&displaylang=en. It's pretty good--especially for being free.
I have used Dundas charts in the past. They are excellent but pricey. There are several other vendors with good chart controls including DotNetCharting, Telerik, Component Art, and Infragistics.

How do I give professional look and feel to my .NET windows application?

I'm using WINFORMS not WPF.
I just know basic c# .net gui programming. I donot want the traditional windows look. I want to have my own custom look (eg. gtalk, antivirus softwares, media players, google chrome).
Actually I'm inspired by google's PICASA software. Its awesome. I want to do something like that.How can I do that? If there is something I should learn please point me.
Also I may have to write my own custom controls (like modified tree view etc..) I guess. Please give some good learning resources.
This article describes how to draw custom windows. The author also shows how to draw non-rectangular windows.
If you could use WPF instead of Windows Forms, this is a good article about customizing window drawing:
http://www.codeguru.com/csharp/.net/net_wpf/article.php/c16379/
There is also a question with some good answers here on SO:
Creating custom forms in WPF?
Update:
I think that skinning and custom drawing is fun to do from a programmers perspective, but I also think that there is almost no benefit for the user.
The creators of the platform you are developing for might have put a lot of effort into the design of their windowing toolkits.
If you just want to change some visual aspects of your application you also should take into account that you might miss some important other aspects of UI design:
consistency
accessibility
aesthetics (if you are overdoing
effects, gradients, ...)
internationalization
...
As you are developing for Windows, you also lose the skinning ability of the OS itself. And I think that some of the skins that come with newer versions of Windows are pretty good.
You can try any of the following:
telerik
Syncfusion
(source: componentsource.co.jp)
Or other components.
They do make your UI pretty.
Edit: if you want to study how they do it, you can buy the source code-- along with documentation and understand from there.
There are some commercial control libraries available.
I can recommend the Krypton Suite. It consists of the free Krypton Toolkit (which contains a lot of skinnable controls) and other non-free controls (Navigator, Ribbon, Docking, Workspace). It has some built-in palettes and renderers that allow you to make your UI look like Office 2010, Office 2007, Office 2003, ...
You want to look for +winforms +skinning. I haven't tried these, but the first hits don't look bad. Most decent skinning tools will be paid for.
From what you said, you want to develop your own custom controls. You have some frameworks for this like Qt which can use Direct3D for hardware accelerated graphics. It also have a Visual Studio plugin. There is a free LGPL version and a commercial version of it.
I remembered about Qt because you mentioned Picasa and as far as I remember, I heard the Picasa UI has been written through Qt.
You can try using "SetWindowRgn(..)" to set an arbitrary region for your window. This may range from giving a rounded rectangle shape to giving a weird looking shape to the form!
Check this out: Link.
There is another option if you are working in Vista(aero enabled), ie you can check out DwmExtendFrameIntoClientArea(..) function here: link text
You can set the form's border style to 'none' and go on to create your custom form! You then might have to create custom buttons to carry out tasks like close, minimise, maximise etc. You might even need to write code for drag and drop events..
For the background, you might need to have a look at the gradient fills to give a great effect, otherwise you can use great looking pictures as Background..! But the latter option isnt good unless you have really good pic.

Map Navigation Control Approach - .NET

I'd like to know what could be the best approach to develop a Windows desktop application that has a map navigability control - very similar to those in Google Maps and Live Maps, with drag and drop support and so on.
Initially, due to time restrictions, I was thinking about a WinForms solution - I think one future solution using WPF would be better, but I'd have to learn all that WPF stuff first.
With that in mind, what approach should I take to develop that? It could be a third part tool, or some simple implementation/algorithm that I could take some ideas from. To be honest, I'm kinda lost, so any idea would be helpful.
Thanks, have a great day
take a look at this codeplex project. Reviewing the Source and downloading the sample project should be a good start.
GMap.Net # Codeplex
There is open-source application Kosmos for browsing OpenStreetMap maps
http://wiki.openstreetmap.org/wiki/Kosmos
However it reads OSM data and renders it on the fly.
I guess you need some example which loads map tiles and put them in the right order. There is such an example for OpenStreetMap: project osmclient on the sourceforge (sorry cannot post a link, i am a newbie)
It can be simply redone to load other sources, even ArcGIS, but be sure if it is compatible with the Map Provider licence. E.g. you cannot choose Google Maps, because you must use Google Maps within their API.

Categories

Resources