WPF validation system performs intial validatation of an object (I mean - all fields are validated when a databound item is changed, and results are displayed on the ui).
But it doesn't work like this, when I add a control dynamically. In such case inital validation happens, but results aren't shown on the ui. Only after some properties ...
Original question: Does an Adorner automagically inherit the "DataContext" of its "AdornedElement" in WPF?
...
When I host WPF controls that use adorners (the error border of the textbox) in a HwndSource the adorners are not shown. It seems that the adorner layer is not there. Why is that so and what can I do against it? Is this a known bug?
...
Is there a way to expand the adornerlayer beyond the window boundaries?
I need to create an adorner for a control that will be shown outside of the window edge.
...
I've been using the same bit of code for several versions of my app with no problems, but I'm now mysteriously receiving NullRerefenceExceptions with the following:
this.Loaded += delegate {
deleteBrush = new DeleteBrushAdorner( background );
AdornerLayer al = AdornerLayer.GetAdornerLayer( background );
al.Add( deleteBrush )...
I have an adorner which is moving along with the mouse cursor. However as soon as the mouse moves outside the window the adorner gets cut off.
Is it possible to expand the adorner layer to the whole screen or create a new adorner layer.
...
This is a bit of a WPF whodunnit!
Update1:
Getting there! It seems that error templates are shown in the adorner layer. When I call var myAdornerLayer = AdornerLayer.GetAdornerLayer(this.txtCaseNumber); myAdornerLayer is null. (After the control is loaded so it's not that). So it seems to be something do with adorners, rather than...
I'm trying to ensure that my error adorners don't get clipped by my scrollviewer's bounds. I have a series of textboxes that are at the edge of a fixed width scrollviewer (no horizontal scrolling, only vertical). I then have adorners that flag textboxes with errors.
The problem is that the adorners get clipped at the edge of the scroll...