Maybe this is not the right forum for my question, but I'll try anyway.
I am creating an application where I want the user to be able to fill in values in a table/matrix. The values are then going to be saved to a database I have set up. I want to build this application using Windows Presentation Foundation (WPF). I watched the following video on youtube:
https://www.youtube.com/watch?v=_i4mYXSaD4w and it shows very well what features I want my own application to have. The problem is, the example in the video is made in Winforms...
So, my question, which can be split into three parts, is:
Is there a way to build something equal, similar or better, in WPF?
What/which control(s) should I use? Grid? DataGrid?
How do I use this control?
I am new to WPF, and do not have a good picture of what controls to use. I have read many questions about WPF's DataGrid on StackOverflow as well as other QnA's, but I couldn't understand how to do what I wanted, or even if it was possible. Therefore, I'm very thankful to anyone who can explain and lead me onto the right track.
I suggest you to read this article: http://www.codeproject.com/Articles/30905/WPF-DataGrid-Practical-Examples
Related
I am writing a UWP app which needs to show milestones against multiple, grouped tasks along a timeline of a video. Basically showing when a task occurred in the timeline. Image below of a crappy excel mock up of what I am talking about.
I have searched and can find some charting option but they are for WPF, javascript or .Net Framework.
Was thinking I could have a go at one myself using a grid as a base and I'm OK on this front for the moment, I am wanting to know if anyone knows of any suitable timeline controls for UWP or can think of another way to visualise this sort of data using available controls.
There are a number of options for UWP if you wanting to just xaml output a DataGrid the only free one I've seen is this
https://github.com/RSuter/MyToolkit
However if your willing to fork some cash there are lots of options. The obvious solution would be which is free for non-commercial use so you can give it a test.
http://www.telerik.com/universal-windows-platform-ui which has a great datagrid
the concept would be removing the first column and adding a new one at the end in a poll
The other option which I thought about mentioning before is https://www.syncfusion.com/ they have a graph library for UWP I have never used there product so I can't really say much about it except I believe they do have a timeline graph.
This is quite old now but I have just had the same issue. After a day of research I have discovered the SyncFusion CellGrid does this perfectly.
https://help.syncfusion.com/uwp/cellgrid/getting-started
Sorry for the dumb question but I'd like to know if an ownerdrawn control can be used in a WPF or silverlight application. I never heard of one though,
Thank you,.....
Actually the beauty of WPF is that every control is actually ownerdraw (in terms of Windows Forms development). You can do with the shape of controls whatever you want still remaining consistent in all functinality provided by him.
It's impossible in one answer to describe all potential WPF has, so I strongly suggest to find WPF documentation and read read read...
i am trying to research some gui technology for c# where i can display a tree view (opposed to the standard one provided.)
Essentially i want to have the gui draw a tree of data (as if you were going to draw a binary tree on a piece of paper or something) Then making each of the nodes clickable.
If this isnt available does anyone know of something where i could have a mindmap type GUI which shows links between elements and those are clickable?
I can guess people will say make one yourself, in which case i give up already ;) thats too advanced for me and as i am on a work placement i dont think i would be granted the time to make it as there are more pressing issues to get working first, like actually making the programme work!
Thank you
You can take a look at the controls in Kevin's WPF Bag-o-Tricks which has a WPF mind map style layout. Here is a nice example. If you want to use more professional components take a look at the product from Nevron Software, they have some great controls. There is also an opensource WPF graphing library - graphsharp (which I have no experience with, but I found a nice article by Sacha Barber). Since it's used in nDepend it must be pretty mature.
I hope you get some inspiration from those links :)
I also found XMind API for C#
https://xmindapi.codeplex.com/
It's free and looks easy to use.
I am building an GUI application to label time series data. With one track displays the time series data, the other track for the user to interactively label the intervals. I immediately recognize that the GUI of my applicatioin would be very similiar to an audio editing software.
So I opened Audacity and started to think about how to program its GUI.
My GUI programming abality is limited in using frames, buttons, labels, etc in the toolbox. But I don't know how to program these controls my self. For instance, a label track (see the above link), contains labels in it. The user can also drag the label to other time stamp.
If I want to program similiar GUI elements in .Net, what kind of techniques should I learn? Thanks a lot!
Going the winforms route, you would create a couple of custom controls (ie the data label, and the label series) that behaves the way you want them to behave and renders the way you want. Here are a couple of links on creating custom controls
http://msmvps.com/blogs/deborahk/archive/2009/10/13/winforms-user-controls-101.aspx
http://www.codeproject.com/KB/miscctrl/ScrollingTextControlArtic.aspx
http://msdn.microsoft.com/en-us/library/6hws6h2t.aspx
I'd hazard you'd be best off learning WPF as it'll give you the quickest route to customising the display of data - however be prepared for a bit of steep learning curve as it's a bit different from the traditional GUI.
If you do learn WPF you may find that the Dynamic Data Display library on codeplex serves as a good point for future customisation.
http://dynamicdatadisplay.codeplex.com/
many hints for learning wpf here:
Where to find good resources to learn XAML?
Good resources for learning WPF
https://stackoverflow.com/questions/59954/what-is-the-best-book-for-learning-wpf
I used WPF very little before and some stuff seemed very different to achieve. Coming from a winforms background, what things will seem different and take you a while to figure out.
Off top of my head, I remember not being able to specify which nodes are selected in a treeview control the way it's done in winforms, if I am not wrong.
I remember the whole MVVM principle..
But its okay now.. we are bffs now! :)
Oh, where to begin? WPF and WinForms seem very different to me. The concept of defining layouts using markup is quite different, although similar to web development. The fact that you need to make an explicit choice of a layout container (for multiple elements) is novel. I remember trying to add a bunch of elements directly within a Window and getting very confused...
I think to take advantage of all that WPF has to offer, you need to have a WPF mindset. For example, you don't have to use styles, templates, and bindings, but those concepts are where the power of WPF lies.
As Daniel stated WPF is different and it needs a different Mindset. You have to forget all the UI side assumptions you made/learned while doing Winforms or other conventional UI side development
I have comeacross so many similar kind of questions in this site. Some interesting once are listed bellow. You can find many here.
What are the most common mistakes
made in WPF development?
How to begin WPF development?
When is Winforms the correct choice vs. WPF?
For your selected node in a treeview the ModelView ViewModel approach works well. People have worked out good design patterns now for this kind of thing making the process much more easy.