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
I realize this may be a misplaced question on this forum but most other forums are less that useless!
I've been searching for tutorials on creating a Windows Desktop program, not a Windows Metro/Store app. All I can find is metro and store.
Can someone point me in the right direction for getting started on this? This is what I have chosen in VS2012:
vs2012 new windows empty project
I will eventually be importing an API but for now I want to get working on a GUI layout. Any pointers/clarification would be great.
If you want to create a Windows GUI app, you should use either Windows Forms Application or WPF Application. These are the primary two ways in which Windows desktop applications are created in C#. Note that the controls offered through these are different from one another, and the basic fashion in which the UI is constructed is totally different as well.
Windows Forms is fairly simple, and uses a visual designer to add controls to the form. WPF relies much more strongly on a complex markup based language, XAML, in which the UI is written in code. WPF offers a great deal more options as far as customizing controls and their appearances, but in order to use it to its greatest potential you have to spend a decent amount of time and frustration understanding how binding works within XAML.
Related
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 7 years ago.
Improve this question
I am writing a game in WinForms, using c#. Well, I absolutely love Visual Studio and WinForms, because coding is very simple, and there is usually no need in any additional content.
The game is text based, but it is also heavily based on UI. But, WinForms has no transparency, and this is something that hurts alot. Interface, labels and pictures are created and positioned dynamically.
I thought about moving to WPF, but I do not know, if i will be able to place controls dynamically in WPF like in WinForms (because WPF is based on grids).
Should I learn more about WPF, or there is any simple WinForms-like analogs, that support transparency and will allow me to create text-based games with UI?
P.S here is image, its QSP game (not mine, but it is something that I want to achieve, but have improved UI, transparent images, and etc.)
Since this is a multi-part question, I will not attempt to address any one specific question but rather provide resources to allow you to embark on learning WPF on your own, and assure you that moving to WPF is a safe choice for converting your application.
I thought about moving to WPF, but I do not know, if i will be able to place controls dynamically in WPF like in WinForms (because WPF is based on grids).
Yes, you can generate, create, and position content dynamically in WPF. See links for example code.
Should I learn more about WPF
Yes, you should learn more about WPF.
or is there any simple WinForms-like analogs, that support transparency and will allow me to create text-based games with UI?
Yes, you can create transparent windows and transparent controls in WPF.
I hope these resources are useful to you.
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 7 years ago.
Improve this question
I've developed Windows Forms applications for 5 years now. A lot of people say that I should look into WPF. I have a few questions about WPF vs Windows Forms to determine which one is best. WPF is newer than Windows Forms and many people say it'll be the future. Others say that Windows Forms is older and therefor more secure. I am not sure what will be the future. I have googled advantages and disadvantages, but I hope that you can give me a more in dept answer to these questions:
Which one is better based upon performance?
What are the top advantages of using WPF instead of Windows Forms?
What are the top advantages of using Windows Forms instead of WPF?
Which one is more used/liked by businesses?
How hard is it to switch from Windows Forms to WPF?
Which parts of WPF should I definitely look into?
There is no meaning to say that WPF is better than windows forms or vice versa. It depends on many factors:
What kind of UI you are building.
Obviously, the complexity of the views you are designing will factor in to performance on both platforms. They have different layout and rendering pipelines.
How effectively you optimize for performance on each platform.
Advantages of using WPF instead of Windows forms:
XAML makes it easy to create and edit your GUI, and allows the work to be split between a designer (XAML) and a programmer (C#, VB.NET etc.).
It allows you to make user interfaces for both Windows applications and web applications (Silverlight/XBAP).
Databinding, which allows you to get a more clean separation of data and layout.
Uses hardware acceleration for drawing the GUI, for better performance.
Top advantages of using Windows forms instead of WPF:
WPF's in-box control suite is far more limited than that of WinForms.
There's greater support in the 3rd-party control space for WinForms. (That's changing, but for now by advantage of time, WinForms has greater support in the community.)
The major drawback of WPF is that Mono doesn't really support it for cross-platform (e.g., it doesn't work on Linux and Mac). Originally, Xamarian/Novella said they weren't going to implement it due to the complexity of implementation. I haven't seen anything to the contrary. Not saying it isn't, but their recommendation is to write model classes and then do a OS-specific front end. Even with WPF being open sourced, it may be built on something that isn't easily ported.
https://social.msdn.microsoft.com/Forums/en-US/e134134a-352f-435b-943a-eda7a2b14fc0/wpf-vs-windows-forms-2015?forum=wpf
Depends upon your learning ability.
Which parts of WPF should I definitely look into?
XAML: Learn about XAML and how it is used in WPF applications.
Layout: Learn about layout panels and how they are used to construct user interfaces.
Data binding: Learn how WPF data binding works and how it can be used.
Data templates and triggers: Learn how data templates and triggers work and how they can be used.
Styles: Learn about how UIs can be styled in WPF.
For more information refer below mentioned URL
Windows Form Vs WPF Windows
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 7 years ago.
Improve this question
Say I coded some application in C# using visual studio. Is there anyway I can take this application and embed it into a website so folks can use it from a website in the same way I would use it from my desktop?
If you coded a console application - no.
If you coded a winforms application - no.
If you coded a WPF application - yes
Two options:
Migrate it to silver light and it will only work on browsers which can install the silver light plug in. keep in mind that silver light is being disbanded by Microsoft, so it is not considered a recommended practice anymore even by MS. also consider that not everyone would agree to install silver light plugin for their browser.
You can also migrate your WPF to become a browser application - but this will require the client machine to have .Net installed on it - so this is like a replacement solution to what once was achieved by ActiveX technology.
Main difference between those two options is that the 1st one is cross-platform/cross-browser solution and the 2nd one is not.. however this might change in the future as .net is becoming available to Linux too..
If you coded ASP.Net - it is already designed for developing web applications.
I'm not sure what exactly you are trying to achieve but I think the WPF/Browser APP is what you looking for, you can read more about it in How to: Create a New WPF Browser Application Project
Edit:
I thought I'd mention if you have a Console or Winform app that people wish to use remotely (ie via a web browser) don't forget they can use Remote Desktop to access the application. Many large enterprises do this using Citrix. Often this is more practical when the cost of rewriting legacy applications is not feasible.
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 7 years ago.
Improve this question
I have not created Windows forms applications (using C# and .NET) since 2005 so I am not sure if it is still a good option for rich client applications. Also I do not know if there is any (comparatively) new framework for building Windows apps other than Composite Application Block.
We have a small team (3 people) in our company who manage the content (e.g. musics, mobile games etc) and I want to build a tool for them. Since there are only a few people who will use this tool I am thinking of creating a Windows app so that rather than spending time and effort on creating a rich Web UI (e.g. using ajax, jquery etc) I focus on the business logic.
I understand that WPF is another option but from my knowledge it is a bit more complicated and time consuming to build an app using WPF.
If Windows forms is my best option, is there any fairly new framework for building Windows apps? 10 years ago I used to use Microsoft's composite application block but it seems to me that it's something for the past!
Building an app using WPF is a bit double edged. It's extremely quick for building something simple, hence why so many tutorials can cover specific behaviours without being gigantic. It's excellent for having automatic layouts, and being able to build said layouts in XAML will feel a thousand times better than setting up alignments in forms, especially if you've done web development. However, deviating from the beaten path (smooth datatypes, good-or-error validation, hardcoded database fields...) will leave you with a steep learning curve, as I find digging around the guts of WPF to be a nightmare.
Note that there are also a number of options available for Mono, most of which also work on Windows without indcident.
EDIT: Since I'm still getting upvotes on this answer, apparently, I'll add that it doesn't seem mono is maintaining the attached page, and the only framework from the above list which appears to have ongoing support is Xwt.
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
I have an existing MS access application for capturing information (normal add, edit forms with drop downs and so-forth) that I'd like to redesign into a WPF C# application using a Microsoft SQL database.
My question is, is WPF the easiest / quickest solution or are there any alternatives anyone can suggest?
I have some knowledge of WPF and a good understanding of SQL databases.
Thanks
It seems that your application is data driven so as an "easy but not so far" alternative to WPF I would suggest you to have a look at Visual Studio LightSwitch. It is especially designed to quickly create data driven screens with full CRUD hosted within Silverlight (desktop) or within HTML5 (web).
Silverlight is quite dead but it will be easy for you to jump on if you are already familiar with WPF.
Have a look here: https://www.youtube.com/watch?v=oIBJrGp-kOY