Re: Validation in TabControl

2012-04-04 Thread Stephen Price
Not considered that, but like the sound. We are using fluent validation
(the framework). I dare say changing how we validate would be massive
change though

Thanks will investigate whats involved. May have to revisit validation
later have other stuff to focus on now
On Apr 4, 2012 5:12 PM, Jordan Knight jak...@gmail.com wrote:

 Have you considered idataerrorinfo and validate in your vm instead?

 Cheers,

 Jordan.

 On 04/04/2012, at 6:55 PM, Stephen Price step...@perthprojects.com
 wrote:

  Hey all,
 
  There's an issue with validating Tabs that are not visible with
 Silverlight. Essentially the tab is not visible, thus not in the visual
 tree and so validation can't be done. It's documented if you search for it
 and there are a few hacks around (one is to switch to each tab, validate
 and move on.). I thought about this as an option but am not sure how to
 disabled the screen from flickering while it does this. Nasty hack, so
 don't like.
 
  We currently iterate through each RadTab control recursively (nested
 TabControls) and add each control to a collection, then validate each one.
 If any are found we just change the colour of the tab. It seems to work for
 most cases, but I've been tracking down one page that doesn't work right.
 
  The problem with this one is there is a control on the page, which is
 where all the work is being done. When the page works (if you just
 navigated to it) then the page returns 2700+ controls to validate. If you
 click save again, while the tab is not visible, then you only get 100.
 Everything inside the control, including the control itself is no longer
 around. So it seems the control is behaving the same way that TabItems
 behave in that if its not visible then you can't validate it.
 
  I guess what I'm asking, has anyone hit this before and perhaps come up
 with a clever solution? (Clever solutions will be considered even if you
 haven't hit it before and are just plain clever.)
  Hell, I'll take dumb solutions at this point!
 
  thanks,
  Stephen
  ___
  ozsilverlight mailing list
  ozsilverlight@ozsilverlight.com
  http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
 ___
 ozsilverlight mailing list
 ozsilverlight@ozsilverlight.com
 http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


Re: Validation in TabControl

2012-04-04 Thread Jordan Knight
Of course, the problem still stands, that if you have hidden tabs, how do
you direct the user back to them to fix the errors :)

On Wed, Apr 4, 2012 at 7:50 PM, Stephen Price step...@perthprojects.comwrote:

 Not considered that, but like the sound. We are using fluent validation
 (the framework). I dare say changing how we validate would be massive
 change though

 Thanks will investigate whats involved. May have to revisit validation
 later have other stuff to focus on now
 On Apr 4, 2012 5:12 PM, Jordan Knight jak...@gmail.com wrote:

 Have you considered idataerrorinfo and validate in your vm instead?

 Cheers,

 Jordan.

 On 04/04/2012, at 6:55 PM, Stephen Price step...@perthprojects.com
 wrote:

  Hey all,
 
  There's an issue with validating Tabs that are not visible with
 Silverlight. Essentially the tab is not visible, thus not in the visual
 tree and so validation can't be done. It's documented if you search for it
 and there are a few hacks around (one is to switch to each tab, validate
 and move on.). I thought about this as an option but am not sure how to
 disabled the screen from flickering while it does this. Nasty hack, so
 don't like.
 
  We currently iterate through each RadTab control recursively (nested
 TabControls) and add each control to a collection, then validate each one.
 If any are found we just change the colour of the tab. It seems to work for
 most cases, but I've been tracking down one page that doesn't work right.
 
  The problem with this one is there is a control on the page, which is
 where all the work is being done. When the page works (if you just
 navigated to it) then the page returns 2700+ controls to validate. If you
 click save again, while the tab is not visible, then you only get 100.
 Everything inside the control, including the control itself is no longer
 around. So it seems the control is behaving the same way that TabItems
 behave in that if its not visible then you can't validate it.
 
  I guess what I'm asking, has anyone hit this before and perhaps come up
 with a clever solution? (Clever solutions will be considered even if you
 haven't hit it before and are just plain clever.)
  Hell, I'll take dumb solutions at this point!
 
  thanks,
  Stephen
  ___
  ozsilverlight mailing list
  ozsilverlight@ozsilverlight.com
  http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
 ___
 ozsilverlight mailing list
 ozsilverlight@ozsilverlight.com
 http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


 ___
 ozsilverlight mailing list
 ozsilverlight@ozsilverlight.com
 http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


Re: Validation in TabControl

2012-04-04 Thread Stephen Price
We are changing the colour of the tab text to red, when error is on that
tab, or it's children. I like the idea of an error icon though. More
accessibility friendly. (assuming thats a word)
On Apr 4, 2012 6:16 PM, Joseph jos...@learnwpf.com wrote:

 In the past I've put an error icon in the tab header to indicate that it
 has errors (the header is always visible if the tab is) but it is a bit of
 a ux hack.

 Joseph

 Sent from my iPhone

 On 04/04/2012, at 7:52 PM, Jordan Knight jak...@gmail.com wrote:

 Of course, the problem still stands, that if you have hidden tabs, how do
 you direct the user back to them to fix the errors :)

 On Wed, Apr 4, 2012 at 7:50 PM, Stephen Price 
 step...@perthprojects.comwrote:

 Not considered that, but like the sound. We are using fluent validation
 (the framework). I dare say changing how we validate would be massive
 change though

 Thanks will investigate whats involved. May have to revisit validation
 later have other stuff to focus on now
 On Apr 4, 2012 5:12 PM, Jordan Knight jak...@gmail.com wrote:

 Have you considered idataerrorinfo and validate in your vm instead?

 Cheers,

 Jordan.

 On 04/04/2012, at 6:55 PM, Stephen Price step...@perthprojects.com
 wrote:

  Hey all,
 
  There's an issue with validating Tabs that are not visible with
 Silverlight. Essentially the tab is not visible, thus not in the visual
 tree and so validation can't be done. It's documented if you search for it
 and there are a few hacks around (one is to switch to each tab, validate
 and move on.). I thought about this as an option but am not sure how to
 disabled the screen from flickering while it does this. Nasty hack, so
 don't like.
 
  We currently iterate through each RadTab control recursively (nested
 TabControls) and add each control to a collection, then validate each one.
 If any are found we just change the colour of the tab. It seems to work for
 most cases, but I've been tracking down one page that doesn't work right.
 
  The problem with this one is there is a control on the page, which is
 where all the work is being done. When the page works (if you just
 navigated to it) then the page returns 2700+ controls to validate. If you
 click save again, while the tab is not visible, then you only get 100.
 Everything inside the control, including the control itself is no longer
 around. So it seems the control is behaving the same way that TabItems
 behave in that if its not visible then you can't validate it.
 
  I guess what I'm asking, has anyone hit this before and perhaps come
 up with a clever solution? (Clever solutions will be considered even if you
 haven't hit it before and are just plain clever.)
  Hell, I'll take dumb solutions at this point!
 
  thanks,
  Stephen
  ___
  ozsilverlight mailing list
  ozsilverlight@ozsilverlight.com
  http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
 ___
 ozsilverlight mailing list
 ozsilverlight@ozsilverlight.com
 http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


 ___
 ozsilverlight mailing list
 ozsilverlight@ozsilverlight.com
 http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


 ___
 ozsilverlight mailing list
 ozsilverlight@ozsilverlight.com
 http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


 ___
 ozsilverlight mailing list
 ozsilverlight@ozsilverlight.com
 http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight