From: Josh Smith <flappleja...@gmail.com>
Date: Mon, 15 Mar 2010 07:08:26 -0800
Local: Mon, Mar 15 2010 11:08 am
Subject: Re: [WPF Disciples] Controlling focus from ViewModel objects
Thanks Pete. I was thinking that there could be an attached property of type I'll have to look into FocusScopes, though I don't see any issues there (I Josh On Mon, Mar 15, 2010 at 6:31 AM, Peter O'Hanlon <pete.ohan...@gmail.com>wrote: > Pete > On Mon, Mar 15, 2010 at 2:24 PM, Josh Smith <flappleja...@gmail.com>wrote: >> Thanks. Any pitfalls or gotchas sticking their heads out? >> On Mon, Mar 15, 2010 at 1:03 AM, Peter O'Hanlon <pete.ohan...@gmail.com>wrote: >>> I like it - I know that it feels "dirty", but it's actually pretty darn >>> On Mon, Mar 15, 2010 at 3:54 AM, Josh Smith <flappleja...@gmail.com>wrote: >>>> A while back Dr. WPF graced us with his clever hack of controlling input >>>> I put the novel down and did a quick spike of the idea. The source code >>>> Implement this interface on your VM class: >>>> /// <summary> >>>> Next, in your VM object (which might implement IDataErrorInfo), do >>>> public ICommand SaveCommand >>>> void Save() >>>> bool HasError >>>> public event EventHandler<MoveFocusEventArgs> MoveFocus; >>>> void RaiseMoveFocus(string focusedProperty) >>>> Lastly, in your View, use my terribly(?) named attached property to >>>> <TextBox >>>> I'm not sure that I like this approach yet. It's a pretty important >>>> Thanks, >>> -- > -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||