WPFfor d

Adam Wilson flyboynw at gmail.com
Wed Feb 20 16:56:47 PST 2013


On Wed, 20 Feb 2013 13:02:26 -0800, Jacob Carlborg <doob at me.com> wrote:

> On 2013-02-20 17:56, Adam Wilson wrote:
>
>> Most allow you to tweak certain aspects, not remove the entire rendering
>> output and start over. I've never found any OS widget kit that allows
>> completely and total control of the widget at the pixel level.
>
> Sure you can. For example, the drawRect: method in NSView in Cocoa on  
> Mac OS X:
>
> https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html#//apple_ref/occ/cl/NSView
>
> In SWT, just add a listener for the paint event:
>
> http://www.java2s.com/Tutorial/Java/0280__SWT/2420__SWT-Image.htm
>

Yep, I can do the same thing in WinForms/GDI+. If that answer was good  
enough then WPF would never have needed to happen. In WPF I don't have to  
hook events and hand-implement drawing code, I can use a basic set of  
primitives to compose the look I want. This is about 10x quicker and  
scales better in vary screen sizes. I am a little baffled as to why my  
explanations aren't clicking ... perhaps we are reading the same words  
differently?

-- 
Adam Wilson
IRC: LightBender
Project Coordinator
The Horizon Project
http://www.thehorizonproject.org/


More information about the Digitalmars-d mailing list