Hi Greg,

 

Don't worry too much about eliminating code behinds.  I find that's a
good guiding principle when first learning XAML based technologies (as
it forces you to change the way you think about architecting solutions),
but just because you have code behind doesn't mean you're doing it
wrong.

 

I doubt there's a hard and fast rule for "no code behinds" that doesn't
have a lot of exceptions.  All I can say is that once you've got some
solid practical experiences working with XAML you'll develop a sense of
when it's appropriate to use code behind and when it isn't.  It probably
comes down to whether it breaks the spirit of the model you've
architected or not, and whether you're willing to break your own rules
in specific instances under strict conditions.

 

All I can do is encourage you to continue through these frustrating
battles.  At some point I know things will start to make more sense for
you.

 

Best of luck,

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]

 

 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Greg Keogh
<[email protected]>
Sent: Monday, 2 August 2010 9:55 AM
To: "'ozSilverlight'" <[email protected]>
Subject: Command binding working

 

Noobie, I pasted the Command.cs and ButtonBase.cs from Patrick
Cauldwell's sample project the into my project and it's working.

 

Thanks for finding that.

 

My previous attempts have used different combinations and versions of
these classes without success. This combination does look subtly
different to any of my previous attempts. Patrick's code is more
primitive than some of the others, so I might try to beef it up and
generalise it with the code from other classes.

 

Oh well, my first stupid MVVM hurdle is over, now I have to deal with
grid selections, double-clicks, trees, and ComponentOne controls. I will
be a challenge to avoid code-behind for all of these cases.

 

Greg


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

_______________________________________________ 
ozsilverlight mailing list 
[email protected] 
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight 

________________________________________________________________________
_______ 

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 
______________________________________________________________________
_______________________________________________
ozsilverlight mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

Reply via email to