Need to make a custom application in which i can drag and drop (predefined) items on to a workspace and move them freely, example is of in Microsoft Office PowerPoint where a workflow diagram can be made easily ...
need a start, where can i get one ?
You may want to take a look at this CodeProject article, concerning how to create a diagram designer in WPF:
http://www.codeproject.com/KB/WPF/WPFDiagramDesigner_Part1.aspx
Sounds like a fun, but big project.
I'd start here: Creating Your Own Drawing Application with Visual Basic .NET, Part 1. It's VB.NET, but it's a good start, and it';s all about the framework. Hopefully, you can translate VB.NET to C#.
I think that you need to learn how to make a simple drag and drop first. Try this tutorial or this tutorial. Hope this helps!
Related
I'm having a lot of fun with C#, recently I created a simple "statistics calculator". It takes in data and calculates the mean, standard deviation etc.
However, I want to add something visual to my console apps. For example a diagram showing the data, or a graph (I also want to try coding something with function graphing).
How can I do that?
It depends on what visual technology you use – WinForms, WPF, MAUI, etc. WinForms has the built-in Chart class. But I think you will eventually want to explore other, 3rd party solutions. I used the LiveCharts with WPF. It is not that hard to prepare data and the graphs look nice.
For GUI with .Net there are many options including:
Web: https://dotnet.microsoft.com/en-us/
Desktop :
https://dotnet.microsoft.com/en-us/apps/desktop ,
https://learn.microsoft.com/en-gb/dotnet/desktop/wpf/get-started/create-app-visual-studio?WT.mc_id=dotnet-35129-website&view=netdesktop-6.0
Multi-Platform: https://dotnet.microsoft.com/en-us/apps/maui , https://www.avaloniaui.net/
I'm currently developing an application that allow the user to program some scripts. I've developed a "compiler" to analyse the script made by the user, but now i want create a visual editor with all the possibilities that the user have, something similar to this: Blockly - A visual programming editor .
I am currently using C# and I have no idea how to develop something like the above. I thought about doing my own draggable UI on top of my DSL, but not sure how to start.
Thanks
For other Wpf developers trying to do something similar, I would not recommend doing this yourself but actually use a webpage within Wpf and then communicate with Blockly through that. I promise you that this will be a lot easier than actually trying to do this yourself.
Use Blockly inside a WebBrowser
If you don't feel like recreating all your script generation code you could also create a custom xml generator for Blockly and then just print out which blocks are connected so like :
<block>
<whileblock repeat="20"/>
<block/>
Then decipher this and generate your script from c# depending on the connected blocks.
Blockly is open source, so feel free to use it for your editor. You don't really need to know much JavaScript in order to use the Blockly libraries, and there's a support group.
You can do it with WPF.
Using Drag and Drop you can get real closer.
Watching this video will help you get sense hou this mechanism works.
Try improving it slowly and playing with it.
2nd step will be to play with lists and drag and drop
Like shown here .
Improve it even more by using data you get from your mouse position,
a good way to do it demonstrated here.
So over the years I have seen quite a few C# and VB applications which have custom UI designs. One of which I can give an example of is the DayZCommander (C#) application which looks like this:
I was wondering this because I wanted to start making login forms which look like this (note this is just a photoshop render):
And just use it for overall form design.
If you can give me some information, or an answer on this topic please do.
Thanks.
First of all you'll have to use WPF to easily achieve these kinda results (It might be possible with WinForms but it will very hard).
You can also use 3rd party controls like MahApps Metro (also available using NuGet). Here's an example of what you can end up with :
You have also tools like Microsoft Expression Blend that will make creating animated UIs/Custom control templates very easy. but sooner or later you'll to dive in XAML to create your own custom control templates but that's beyond the scope of this answer (there are plenty of good tutorials online).
I'm trying to make application in GTK and I need to make make my application able to drag item from one listview to another. Is it possible? If yes, please place me here example or tutorial website.
Note: I'm using C# in MonoDevelop 2.4
Is it Possible?
Yes! It is possible and not that difficult to implement. (Especially if you are using a high level language like C#.)
Example or Tutorial Website?
If you want Drag And Drop in Gtk, then I think what you are looking for is the Gtk.Drag Class. You can see it's usage in the Mono-Project Docs. There is also a tutorial available at Gnome.org . Although the tutorial is for GTK+ , it shouldn't be too hard to port it for use with GTK#. I am not sure if I can find valid tutorials for Drag and Drop in Gtk.ListView, but you can get the general idea by seeing this PyGTK tutorial on Drag and Drop with Gtk.Treeview : Tutorial Link. and this Gtkmm one : Tutorial Link .
There is another GTK+ DND tutorial over here: Tutorial Link . You may also look at the Pyjama Project sources.
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.