[IronPython] Validation in Silverlight
Lukas Cenovsky
cenovsky at bakalari.cz
Tue Apr 27 15:26:34 CEST 2010
Here are the example files.
Lukas Cenovsky wrote:
> Hi Hall,
> I'm trying to make Silverlight 3 validation working with IronPython
> but it seems there is necessary a small manual step.
>
> I followed some tutorials and this should be enough:
>
> 1) Set binding to: Mode=TwoWay, ValidatesOnExceptions=True,
> NotifyOnValidationError=True
> 2) Raise Exception in the setter
>
> Then the control with bound property should became invalid.
>
> I tried it with TextBox and I failed - the control still appeared
> valid even when the exception was raised.
>
> The solution is to manually set the control into invalid state (based
> on BindingValidationError event) - see attached files for example.
>
> Does anybody know why the control is not set into invalid state
> automatically?
>
> --
> -- Lukáš
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: app.py
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100427/58576840/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: app.xaml
Type: application/xaml+xml
Size: 562 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100427/58576840/attachment.bin>
More information about the Ironpython-users
mailing list