Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
For Quick learning WPF,I am following few books of WPF.But I don't know how to start it and which steps I have to follow to get Quick knowledge on WPF Programming with C#
Try to think of interesting and useful projects. I suggest a charting library with data-binding support. You will learn many important notions like:
Composing elements in a container
Creating custom dependency properties
Providing data-binding support for the list of points to draw (for example), using INotifyCollectionChanged interface
Using fast rendering techniques to plot thousands of points (look for DrawingVisual class)
And most importantly: you will learn to create your own components that suit your own needs, instead of always relying on existing ones.
Resources
Interesting (must read !) resources that are not always documented in books:
WPF Apps With The Model-View-ViewModel Design Pattern, Josh Smith
http://msdn.microsoft.com/en-us/magazine/dd419663.aspx
Writing More Efficient ItemsControls, Charles Petzold
http://msdn.microsoft.com/en-us/magazine/dd483292.aspx
Using DrawingVisual Objects, MSDN
http://msdn.microsoft.com/en-us/library/ms742254.aspx
There are a lot of tutorials on WindowsClient.net, head over there and go through all of them. After that you might want to consider studying for the MCTS / MCPD in Visual Studio 2010 for Windows Development, that will certainly get you on the right track.
"WPF 4 Unleashed" by Adam Nathan.
You don't need anything else.
Follow the MVVM pattern
Don't use code-behind unless you really have to
Try and keep all your logic in your ViewModels
Try to make your views dumb, so that they only concern themselves with presentation
Create standard control styles and templates and push them into resource dictionaries so that most of the XAML in your Views is plain and simple
Use (and study) a good WPF Framework such as Caliburn Micro which will push you the direction of best practice
Pick up a copy of Pro WPF in C# 2010
Online tutorials. What helped for me was doing some WPF with F# tutorials that were based off Petzold's book. They started off doing everything programmatically without designers, and without xaml, and I learned xaml later.
But that is just me. There are a lot of online tutorials out there, that will probably be quicker, yet less thorough than books.
What books are you going through, and why are you having trouble starting at the beginning?
Nice article to start:
http://msdn.microsoft.com/en-us/magazine/dd419663.aspx
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I am currently writing my bachelor thesis about process optimization for creation of XML rendering Stylesheets for another application.
Therefore I am writing a very small and super basic software tool which displays XML structures in tree views. It enables the user to change those (add and delete nodes) and to do some simple application specific stuff.
For doing that, I use Windows Forms.
My question is if I should use a specific architecture or design pattern like MVC or if it would be sufficient to only stick to basic patterns like factory method, command, observer etc.
I am afraid that MVC would be overkill. But on the other hand I am afraid that I should make use of it as it is for a thesis...
The tool should only run on desktop. I don't think there will be any update after initial development.
Hoping for some toughs...
Most answers here will involve opinion. I lean towards suggesting you don't worry too much, but rather try writing it in a way that makes sense to you then once you've got it working, take a look at whether there are any patterns out there that would improve your implementation.
Many of these patterns only make sense once you hit a certain scale with your program.
I'll add that WinForms has its own way of working that pre-dates much of modern MVC. You can shoe-horn it in, but it's not going to feel totally natural. This also factors into my suggestion that you first get your solution working, then explore options to tidy it up.
WPF might be a better fit for the kind of application you're building (HierarchicalDataTemplate), but the learning curve for WPF is very steep.
Of course if the people grading your work are looking for usage of patterns, then that's a different thing.
Good luck!
There are arguably two primary reasons for using a specific design pattern in this context:
You feel it it makes it easier for you to develop and maintain the code base (this is the main reason for using a design pattern in any context).
You feel it would reflect well on you and potentially improve your grade.
Regarding the first point, I assume the code you are writing is not a long term project. There are some exceptions to this rule (for example this one), but in general most thesis project codebases aren't maintained as long term software projects, even if concepts from them are re-used.
Regarding the second point, if you feel you can easily integrate the design pattern without writing more plumbing code for it than the code you are writing for your thesis, then it may help you express your concepts more clearly. However, if you feel it will be a larger distraction, and that you can build a high quality codebase without it, I would avoid being so opinionated, especially on a research project where the concept between inception and completion could change so drastically, and your professor may not care for "over-engineering".
If you have time, I would say the best thing to do is get the thing working first, and then decide if you could get value out of refactoring it into a specific design pattern.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I want to build a management system using Windows Presentation Foundation. I know there's Expression Blend for Graphics design and VS for C# code.
my question is, should i build all UI first using Blend (Buttons, Windows, other elements) and then writing all code (Data bindings, database connections, etc.) or should i build it one step at a time ?
It's my first time using this tech, I've used Windows forms in the past and i want to implement some good-looking graphics in my app.
WPF is intended to make following either UI-first, code-first, or parallel approaches possible - particularly with an MVVM architecture.
However, I suggest starting by putting together a vertical slice through all layers of your application. Reality tends to bite, and depending on how you put your architecture together you will undoubtedly come across many issues that impact your chosen approach.
Since UI is important to you, "Blendability" (the ability to use blend alongside a VS solution) is likely to be a requirement. In this case, you'll want to research carefully how to create a solution structure that will support this.
I think you should take it one step at a time. Don't worry about too many frills in the UI, you can always add to it more later. Keep in mind how you want it to look, and afterwards you can create better looking styles etc. in Blend.
I personally use Visual Studio for most of my development, even the UI. I use blend for creating templates or styles mostly. It used to be that blend was superior to Visual Studio in the designer support, but with VS2012 it has gotten quite good. Also, Blend has a learning curve, it would take some time to get used to. Since you are new, I would suggest not overcomplicating things for you.
The number one thing you need to know about WPF vs. Winforms is complete separation of UI/App logic. It is often much easier to create "ViewModels" with properties and bind those properties to the GUI. If you try to get too involved manipulating GUI elements from code, you'll start digging yourself into a deep hole. The GUI should be databindings, triggers, behaviors, templates, etc.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Im a pretty experienced programmer in PHP and mainly web languages but today i have decided i want to start to learn a new language!
Im only 21 and I feel as I will never make it in the programming industry without a great set of languages under my belt, So i decided to have a look at C#.
The reason I have chosen C# is because some C programmers have told me that C# is the best language to learn for desktop applications.
I think i need to get started with the Syntax / Structure of C#, What Development Environment to use, and other things that i might face along my new journey.
I hope somebody can guide me
Thanks.
For IDE, you can use Visual Studio Express. And here's a nice set of tutorials.
Also do get your basic concepts straight about .NET framework and CLR.
Once you get the hang of it, Try out LINQ. It is (arguably)the most wonderful feature of the framework. Find some good LINQ tutorials here and here
Although you explicitly mentioned Desktop applications, .NET FW is equally suitable for Web applications 4GuysfromRolla is my favorite ASP.NET resource.
For Dektop applications you might want to start with WinForms, but WPF is the technology of the future. So you are better off learning it if you want to be developing Desktop applications for windows.
Happy Learning!
Stuff you'll need for the beginning:
Visual Studio 2010 Express edition
Few evenings with coffee and Beginner Developer Learning Center
A nice book like this one (it might be a giant one, but I'm in love with it)
Some more coffee
A lot of patience with stuff that isn't in PHP (LINQ, delegates, generic types etc)
Some nice idea to start actually developing and trying stuff out
The best way to learn is to have a problem to solve, and specifically I mean to do something that you DON'T know how to do, rather than something for which you already have the tools. I'd browse around on the net for some toy problems and try to build an app for it.
Eg. I only started on the way down OOP once I decided I needed a poker probability calculator. So basically I had to read a bunch of stuff about VB 6 as I went along. Classes, properties, methods, syntax... the web is great for that kind of thing.
I suppose what I mean is Just Do IT... (see what I did there? :) You'll screw things up, but learn loads more than any book can teach you.
If you're using Visual Studio for Learning it you can use MSDN that perfect for early learning is enough.
I highly recommend Illustrated C# 2008 by Daniel Solis. That's the book I used to learn how the C# language worked (Don't be fooled by "Illustrated" in the title: it's not so much a "beginner's" book as much as it uses good illustrations to teach the language).
You might consider following up with a book dedicated to Silverlight, Windows Presentation Foundation, or ASP.NET if you want to be able to apply what you learn in C# to an appropriate API. I would recommend any book by Matthew MacDonald for the latter.
Learning the basics Pascal, Java, C# and even C is more or less the same...
Start with the studying material of any academic "Introduction to Computer Science" course,
try solving the assignments in a few different languages (to learn C# at a C-like level),
then move on the material from any academic "Object Oriented Programming" course to learn the rest of the basics.
After that is only a matter of experience and searching the MSDN help.
Since you're already an experienced programmer learning C# is more a less an exercise in learning the .NET Framework. The syntax should be easy enough for you to nail down pretty quickly, just by looking for a few tutorials. The harder part will be learning the vast API available to you via the Framework.
I suggest finding a good book on C# (I've had good experience with Microsoft Press and I've heard good things about Wrox and O'Reilly). Make sure it discusses classes, polymorphism (inheritance and interfaces), event based programming, LINQ and reflection.
I believe you'll also want to look at any books dealing specifically with ADO.NET and WPF. The great thing about .NET is once you learn the .NET Framework API you can pretty much move between languages as needed.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have a customer who needs to convert a diagramming application (which was developed in MFC a long time ago) to C#.
The application displays large networks (lots of graphical elements), and lets the user edit/manipulate the data through a graphical ui.
I decided that it would be best to use a library rather than to develop all from scracth (all graphic objects/selection/tools/events/etc)
I am looking for a commercial solution.
I found three that seem to be very mature, and I wonder if
anyone had used them and can write his/her opinon:
Tom Sawyer Visualization
IBM ILog Diagrammer for .Net
yWorks - yFiles for .Net
thanks
Yaron
I am not familiar with this libraries, but one of my old projects we have use GoDiagram library, and can suggest that too
For making good looking diagrams in .Net you should check out Frank Hileman's VG.Net. He's a reputed MVP and I believe his solution is really good:
http://www.vgdotnet.com/
I recommend MindFusion's Flowchart.NET. It's very easy to use and is very affordable considering it comes with a multitude of powerful layouting algorithms. Previously we used GoDiagram, but I recommend against it because their licensing system is a nightmare if you have build machines, and it's much more expensive.
I believe Dundas charts is the most famous one...or at least the most advertised one:
http://www.dundas.com/Microsite/ChartNET/Default.aspx?Campaign=GoogleCSharpChart&gclid=CM-wncOq354CFUmK3godxENfMQ
I know this probably isn't the best solution but I'm going to put it out there anyway.
I've done something similar to this using .Net's System.ComponenetModel.DesignSurface. This is the same design service used in Visual Studio's Windows Forms so all you do is create your controls, add your control designers if you want and you're good to go. You can use the PropertyGrid to display the data for each object as they are selected. Code Project has several articles about this like this one.
That said it's not going to be the best performance wise, I've got several thousand controls on my DesignSurface in some cases and it gets sluggish. You may be able to get around this by using another root designer type (WPF maybe?).
This could be a very good option if you already know how to do custom Windows Forms controls. And best of all it’s free!
Have a look at Orbifold. They have got WPF based solutions (commercial) or libraries supporting GDI+ (free).
It's also a good starting point for information about diagramming algorithms in general.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
My background is in web programming, mostly scripting with Perl. And I've recently been tasked with creating a desktop application. I'm wondering, where can one learn such concepts like making executables, what DLLs are for, how UIs are made, what threads are, etc.
I already have C# in Depth by Jon Skeet and C# in a Nutshell. I'm not worried about learning C# itself as much as I am learning about the workflows involved with using it on the desktop, things that are typically not done in web development.
Where should I look?
One starting point would be WindowsClient.net (Microsoft). Lots of videos too. But maybe a little less suited for the absolute beginners.
I only recently began learning C# myself - so I have quite the array(... ;) ) of links:
C-Sharp Corner
CSharp Friends
CSharp Help
CSharp for absolute beginners - Very good
CSharp-online
Hope these help.
For learning .NET application development (the only way people should write apps on windows boxes without requirements otherwise), start with the excellent book CLR Via C# by Jeffrey Richter. Save the first couple chapters for later. You'll get everything you need to know about C# and the 2.0 CLR, which is the basis of all .NET application development (in C#, anyhow.)
Once you're done with that, look into Linq. Linq covers a number of different language feature updates that came in 3.0 and 3.5 versions of the framework and their associated language updates. With the basics + a good understanding of Linq, you'll be creating decent apps in no time.
Now, for which framework to use when constructing desktop apps: Winforms, or WPF.
If you're a web developer, throw that old winforms crap away and get with WPF. You'll feel much more comfortable with editing WPF forms in xaml than dealing with winforms.
The best thing about WPF is the amazing databinding support. In fact, the WPF version of MVC is based on the databinding support in WPF.
Check out the databinding cheat sheet, then learn about MVVM.
A good place to start would be to read MCTS Exam 70-546 Windows-based client development, then read 70-548 Designing and Developing Windows-based application. After that, you will probably need to read books focused on the specific technologies your app will use.
Surprised no one has answered this yet:
Programming Windows With C#, by Charles Petzold. Great book, easy read. Example based, but well organized for people that want to jump directly to a particular topic. He actually explains what's going on in each example, and why he's doing what he's doing. Really, a great resource.
(Note: this is a Windows Forms book...no WPF. Great for what it does, but if you're looking for WPF, look elsewhere.)
Old question, but i had to learn the same thing recently. I got the Visual C# 2012 step by step book. It teaches C# along with WPM. A good way to learn.
From what I hear and the little I have read of it Chris Sells's book on WinForms would be useful that. If I am not mistaken he has also done a book on WPF, but I don't know if it is any good.
Check Windows Developer Training Resources and for sure you will need the help of a book and some videos
You can start by building a new project in Visual Studio and selecting the one of the project templates under C#\Windows. This will build a simple application so you can see the basic elements of the project. For example select 'Windows Forms Application' this will start you off with a form where you can drag and drop additional page elements. You can then use Intellisence to explore the options on the controls. Also load the sample projects so you can see working examples.
That's how I would do it.
I recommend you the C# Yellow Book (Rob Miles) it's free and very useful to learn C# basics fast.