fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Poll: WinForms vs. WPF/XAML.... Which one(s) do *you* use???

Poll: WinForms vs. WPF/XAML.... Which one(s) do *you* use??? 1 week 5 days ago #1

  FoxProMatt_MattSlay's Avatar Topic Author FoxProMatt_MattSlay Offline Posts: 92
As a newcomer to X#, I'm trying to get a feel as to which UI solution most of the X# developers are using for there applications?

Is it like 70% WinForms and 30% WPF/XAMPL? Something like that?

Please help me understand...

Please Log in or Create an account to join the conversation.

Poll: WinForms vs. WPF/XAML.... Which one(s) do *you* use??? 1 week 5 days ago #2

  lumberjack's Avatar lumberjack Offline Posts: 367
Winforms 100% here
______________________
Johan Nel
George, South Africa

Please Log in or Create an account to join the conversation.

Poll: WinForms vs. WPF/XAML.... Which one(s) do *you* use??? 1 week 5 days ago #3

  Terry's Avatar Terry Offline Posts: 122
Hi Matt

I am not in a position to answer exactly what you asked. (I'm a C-Sharper looking in).

Having said that I have no hesitation is saying "get to grips with WPF as soon as you can". It is the future
and will allow you to target the widest range of display hardware automatically.

It is something that is probably new to you - if you have WinForms stuff that you need to get out to users, then you may find that quicker.

The thing you have to remember with WPF is the approach - every control works on the basis of "calculate the size required, then put the data in". That is a logical way to do things if you think about it.

As you get into XSharp you need to think - not only is it bringing you into the .Net world but at the same time it is the path to the future.

HTH

Terry

Please Log in or Create an account to join the conversation.

Poll: WinForms vs. WPF/XAML.... Which one(s) do *you* use??? 1 week 5 days ago #4

  George's Avatar George Offline Posts: 71
WinForms.

WPF only for integrating Bing Maps in a WinForms App.

Please Log in or Create an account to join the conversation.

Poll: WinForms vs. WPF/XAML.... Which one(s) do *you* use??? 1 week 5 days ago #5

  wriedmann's Avatar wriedmann Offline Posts: 1491
Hi Matt,

WPF whereas possible, but written in code, not XAML.
WPF is very powerful, and with own control classes you have a lot of power.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

Poll: WinForms vs. WPF/XAML.... Which one(s) do *you* use??? 1 week 5 days ago #6

  ic2's Avatar ic2 Offline Posts: 454
WPF. Not because I'm a fan -on the contrary- but because it's the most flexible (in the end).
I try to use the XAML editor as much as possible but that is often difficult as you can not move controls to where you expect due to all kinds of restraints within stackpanels, grids, etc.
Advantage is that you can just copy and paste some XAML code from the internet to get a specific look and feel in the complete window, or just how a button should look.

Disadvantage is that the WPF designers apparently never heard of Winforms in their whole life when they created WPF. So sometimes you see a code snippet for a control and this only works on Winforms (Same control). Or the other way around. They also forgot some important controls, like a window to select a directory including the option to type the name yourself. That can still be realized within WPF...with Winforms. Which, I must admit, makes one think ...why didn't I choose Winforms in the first place....

Another reason for me for WPF is that it's the only way when you want to create UWP programs. I created a few (in C#).

Dick

Please Log in or Create an account to join the conversation.

Poll: WinForms vs. WPF/XAML.... Which one(s) do *you* use??? 1 week 5 days ago #7

  NickFriend's Avatar NickFriend Offline Posts: 171
WPF all the way, but I'd strongly advise to invest in a good set of UI components. I use the DevExpress WPF control set, and it's fabulous, but there are other options like Infragistics and Telerik as well. WPF is amazingly flexible, but can be a slog if you try to do everything yourself - which is where the commercial control set comes in.

The other thing about WPF is it leads you naturally to the MVVM pattern of programming, which is also another massive step forward in terms of app design.

Nick

Please Log in or Create an account to join the conversation.

Poll: WinForms vs. WPF/XAML.... Which one(s) do *you* use??? 1 week 5 days ago #8

  FoxProMatt_MattSlay's Avatar Topic Author FoxProMatt_MattSlay Offline Posts: 92
Wolfgang - any short code samples you can post which show creating XAML objects in code, rather than the actual XAML markup?

Please Log in or Create an account to join the conversation.

Last edit: by FoxProMatt_MattSlay.

Poll: WinForms vs. WPF/XAML.... Which one(s) do *you* use??? 1 week 5 days ago #9

  lumberjack's Avatar lumberjack Offline Posts: 367
Hi Matt,

FoxProMatt_MattSlay wrote: Wolfgang - any short code samples you can post which show creating XAML objects in code, rather than the actual XAML markup?

Under Help, Phil Hepburn's eNotes. Download
______________________
Johan Nel
George, South Africa

Please Log in or Create an account to join the conversation.

Poll: WinForms vs. WPF/XAML.... Which one(s) do *you* use??? 1 week 4 days ago #10

  wriedmann's Avatar wriedmann Offline Posts: 1491
Hi Matt,

if you are XIDE: New application - Samples and take WPF Simple App and then the WPF Enhanced App.
These samples are a contribution of myself.
It is really simple, but a lot of code, if you are using the base classes:
oGrid := Grid{} 
oGrid:ColumnDefinitions:Add( ColumnDefinition{} )
oGrid:ColumnDefinitions:Add( ColumnDefinition{} )
oGrid:RowDefinitions:Add( RowDefinition{} )
oGrid:RowDefinitions:Add( RowDefinition{} )
oGrid:RowDefinitions:Add( RowDefinition{} )
	
oLabel := Label{}
oLabel:Content := "Label 1"
oLabel:Name := "Label1" 
oLabel:Margin := oMargin
oLabel:Height := nHeight
Grid.SetRow( oLabel, 0 )	
Grid.SetColumn( oLabel, 0 )	
oGrid:Children:Add( oLabel )
	
oTextBox := TextBox{}
oTextBox:Text := ""
oTextBox:Name := "TextBox1"
oTextBox:Margin := oMargin
oTextBox:Height := nHeight
Grid.SetRow( oTextBox, 0 )	
Grid.SetColumn( oTextBox, 1 )	
oGrid:Children:Add( oTextBox )

But if you have learned OOP <g> then you will find a better solution, very quickly: define own control classes.
And then it looks so:
oGrid := WPFGrid{ 2, 3 }
	
oLabel := WPFLabel{ "Label1", "Label 1" }
oLabel:Margin := oMargin
oLabel:Height := nHeight
oGrid:AddControl( oLabel, 0, 0 )
	
oTextBox := WPFTextBox{ "TextBox1" }
oTextBox:Margin := oMargin
oTextBox:Height := nHeight
oGrid:AddControl( oTextBox, 1, 0 )

And then you can try to look at the MVVM samples - they show a name based binding like in VO.

Of course, feel free to ask!

Wolfgang
P.S. I'm not a friend of painters, and WPF is so dynamic that you have to re-think your windows: how should they adapt itself to changing screen sizes
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

  • Page:
  • 1