Click here to Skip to main content
15,900,378 members
Home / Discussions / C#
   

C#

 
Questionwhat is the best method of drawing for my situation Pin
Hamed Metalgear20-Sep-11 11:12
Hamed Metalgear20-Sep-11 11:12 
AnswerRe: what is the best method of drawing for my situation Pin
Luc Pattyn20-Sep-11 11:16
sitebuilderLuc Pattyn20-Sep-11 11:16 
AnswerRe: what is the best method of drawing for my situation Pin
SledgeHammer0120-Sep-11 12:18
SledgeHammer0120-Sep-11 12:18 
GeneralRe: what is the best method of drawing for my situation Pin
Hamed Metalgear20-Sep-11 22:41
Hamed Metalgear20-Sep-11 22:41 
GeneralRe: what is the best method of drawing for my situation Pin
#realJSOP21-Sep-11 2:04
professional#realJSOP21-Sep-11 2:04 
GeneralRe: what is the best method of drawing for my situation Pin
SledgeHammer0121-Sep-11 6:31
SledgeHammer0121-Sep-11 6:31 
AnswerRe: what is the best method of drawing for my situation Pin
Hamed Metalgear21-Sep-11 9:04
Hamed Metalgear21-Sep-11 9:04 
GeneralRe: what is the best method of drawing for my situation Pin
SledgeHammer0121-Sep-11 9:50
SledgeHammer0121-Sep-11 9:50 
Remember, in GDI/GDI+, you draw on a FLATTENED surface. You lose all context of what you just drew. Lets say you draw 2 squares in GDI/GDI+... as soon as you draw them, as far as the drawing surface is concerned, they are now just a bunch of random pixels. You have to implement all the hit testing, z-order, mouse tracking, position, size, etc. In WPF, the surface is layered for you already and all shapes are objects. So everything I just listed (hit testing, z-order, mouse tracking, position, size, etc.) is free for you out of the box.

Another scenario... lets say you have a bunch of shapes and want to move one. In GDI/GDI+, you'd have to know which part of the screen to redraw, double buffer it and update the position of the new shape. In WPF, you just type "rect.Left += 10;" and you are done. WPF knows what it has to redraw, the double buffering is done for you, etc.

To implement a full featured drawing surface without WPF is a ton of work. To implement the same thing in WPF is a fraction of the work since most of it is done for you already and it will perform better since WPF is hardware accelerated where GDI/GDI+ is not. GDI/GDI+ is all software rendering.
GeneralRe: what is the best method of drawing for my situation Pin
Hamed Metalgear21-Sep-11 10:08
Hamed Metalgear21-Sep-11 10:08 
GeneralRe: what is the best method of drawing for my situation Pin
SledgeHammer0121-Sep-11 11:45
SledgeHammer0121-Sep-11 11:45 
GeneralRe: what is the best method of drawing for my situation Pin
Hamed Metalgear21-Sep-11 20:44
Hamed Metalgear21-Sep-11 20:44 
QuestionForm Application run into troubles on Vista. DEP Disabled [modified] Pin
shabi.b20-Sep-11 7:18
shabi.b20-Sep-11 7:18 
AnswerRe: Form Application run into troubles on Vista. DEP Disabled Pin
#realJSOP21-Sep-11 2:06
professional#realJSOP21-Sep-11 2:06 
GeneralRe: Form Application run into troubles on Vista. DEP Disabled Pin
shabi.b21-Sep-11 2:25
shabi.b21-Sep-11 2:25 
AnswerRe: Form Application run into troubles on Vista. DEP Disabled Pin
Bernhard Hiller21-Sep-11 3:53
Bernhard Hiller21-Sep-11 3:53 
QuestionAdvice or Assistance with remote performance monitoring Pin
CCodeNewbie20-Sep-11 5:04
CCodeNewbie20-Sep-11 5:04 
AnswerRe: Advice or Assistance with remote performance monitoring Pin
PIEBALDconsult20-Sep-11 5:21
mvePIEBALDconsult20-Sep-11 5:21 
GeneralRe: Advice or Assistance with remote performance monitoring Pin
CCodeNewbie20-Sep-11 5:47
CCodeNewbie20-Sep-11 5:47 
GeneralRe: Advice or Assistance with remote performance monitoring Pin
PIEBALDconsult20-Sep-11 14:39
mvePIEBALDconsult20-Sep-11 14:39 
QuestionRetreiving Exe Version information from Program Files Pin
get120620-Sep-11 3:47
get120620-Sep-11 3:47 
AnswerRe: Retreiving Exe Version information from Program Files Pin
Luc Pattyn20-Sep-11 4:10
sitebuilderLuc Pattyn20-Sep-11 4:10 
AnswerRe: Retreiving Exe Version information from Program Files Pin
Pete O'Hanlon20-Sep-11 4:38
mvePete O'Hanlon20-Sep-11 4:38 
AnswerRe: Retreiving Exe Version information from Program Files Pin
Bernhard Hiller21-Sep-11 3:58
Bernhard Hiller21-Sep-11 3:58 
QuestionDataSet & WinForms: Inserting data into a many-to-many table. Pin
cjb11020-Sep-11 2:52
cjb11020-Sep-11 2:52 
QuestionDb connection Exception Pin
anishkannan20-Sep-11 0:52
anishkannan20-Sep-11 0:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.