Changing the width of the adorned element.

Sep 8, 2011 at 5:02 PM

BTW,  nice work!

Is there a way to change the adorned elements width or probably margin to fit the images being displayed?  Right now I have a margin set to fit them in with a style.  It would be nice to have the ability to adjust the adorned elements margin dynamically to fit the images.  Right now the images overlay things tot he right and left of the controls.  Doesn't look right, in my layout.  I want to keep the space between fields small at the moment.

Bryan

Sep 19, 2011 at 11:30 AM

Hi Bryan,

I don't really understand your issue. Can you provide some more informations?

- Which adorner do you use?

- Which version of TT.UIA do you use (WPF or SL)?

Thanks,

Jörg

Sep 19, 2011 at 6:28 PM

Jörg,

I use WPF and the AttachErrorTemplate adorner.

Works great.

When an error occurs the error icon is displayed to the right of the control.

What I would like to do is to reduce the width of the control to fit the error icon.

There are controls to the right of the adorned controls that get run over by the error icons when this occurs.

Bryan

Sep 22, 2011 at 8:42 AM

Hi Bryan,

there isn't an easy way to do it, because you can't change the size of the control in the error template. You have to implement a custom behavior or adorner for that. In this case you must add an error handler via Validation.AddErrorHandler() and then resize the control accordingly.

Jörg