*choke*
For the most part, I find the binding system in WPF brilliant. It does
get a little tricky with finding ancestors in the visual tree (and with
occasional unavoidable silent binding errors), but for the most part
binding to some sort of view model gives you the sort of power that
makes it easier to use than WinForms. Data driven => Nirvana.
Binding the UI to a view model and changing the UI via data manipulation
(rather than by UI control manipulation) is what makes WPF so much
easier/better than WinForms for me. Using a view model is probably the
key lesson that broke me out of WinForms thinking and into WPF thinking.
>From there on, everything else is (more or less) relatively simple.
Carl.
Carl Scarlett
Senior .NET/WPF Developer, UX Designer - Genesis Team
IT Applications Delivery | Bankwest
A: Level 5, 199 Hay Street | Perth | Western Australia | 6004
P: (08) 9449 8703
M: 0408 913 870
E: [email protected]
AFR Smart Investor Blue Ribbon Awards
2010 Bank of the Year
From: [email protected] [mailto:[email protected]]
On Behalf Of Greg Keogh <[email protected]>
Sent: Monday, 1 November 2010 4:34 AM
To: "'ozWPF'" <[email protected]>
Subject: RE: Dialog OK/Cancel binding
Just throwing this out there.. but could the OP bind the IsEnabled
property
straight to the PropertyGrid in question, and use a converter to convert
the
prop to a bool?
The PropertyGrid is a WinForms control, so no binding to that I'd think.
Although I have experimented with artificial binding in Win32 apps
before. I
had a static helper class that registered a collection of event handlers
for
things like TextChanged, SelectedIndexChanged, etc and would use
reflection
to set properties and fire events. It actually worked fine, but I never
bothered to use the technique in anger in a big app. I think the amount
of
code required to setup all the binds got a bit tedious.
I wish binding in WPF and Silverlight was more "natural". It's an
illusion
created by an artifice of plumbing with static methods and collections.
Greg
_______________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
________________________________________________________________________
_______
This email has been scanned by the Bankwest Email Security System.
________________________________________________________________________
_______
_______________________________________________________________________________
Unencrypted electronic mail is not secure and may not be authentic.
If you have any doubts as to the contents please telephone to confirm.
This electronic transmission including any attachments is intended only
for those to whom it is addressed. It may contain copyright material or
information that is confidential, privileged or exempt from disclosure by law.
Any claim to privilege is not waived or lost by reason of mistaken transmission
of this information. If you are not the intended recipient you must not
distribute or copy this transmission and should please notify the sender.
Your costs for doing this will be reimbursed by the sender.
We do not accept liability in connection with computer virus, data corruption,
delay, interruption, unauthorised access or unauthorised amendment.
_______________________________________________________________________________
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
_______________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf