I created a descendant of RangeBase. In this descendant I created Template where I used TextBox control. Now I need validate Value (of inherited RangeBase) when is invalid value is entered to TextBox(contained in Template).
And here is my problem: If I want to validate new descendant control, only TextBox is adorned with validation error(using appropriate ControlTemplate) - TextBox contains appropriate validation in binding of Text property(
)
But I need it to be adorned my new control, as a whole(not just TextBox):
.
Is there a way to do this?
Perhaps it's needed to change the AdornerLayer so that the adorner does not appear on the TextBox, but on my new element.
How to change AdornerLayer to show ValidationError (WPF)
355 Views Asked by Stefan Babos At
1
There are 1 best solutions below
Related Questions in WPF
- WPF MessageBox Cancel checkbox check
- WPF multiple control property simultaneous changes
- ObservableCollection.CollectionChanged does not select the correct DataTemplate on ToolBar
- Telerik's WPF RadColorPicker NoColorText property not working
- How to automate UI interaction during acceptance test run
- Binding to "this.property" object in VisualStateMenager
- ContextMenu Closes Immediately
- Update ObservableCollection where the items are received from another List
- change content button with trigger
- WPF - How to highlight a combobox border when focused
- Wpf No Highlight on ListBoxItem for Touch Devices
- WPF WebBrowser how best to get Tag trees
- Make a class suitable for Property Change Notification
- WPF Comparing two datatables to find matching values
- how to create folder and file with datetime in wpf application
Related Questions in WPF-CONTROLS
- Button Visibility in WPF at startup
- Obtaining value from Calendar control without selecting a day
- Combo Box 1st item is remained empty in WPF c#
- Remove close button in an Extended WPF Toolkit style
- How to add custom user controls before the MainPage in Windows Store App
- XAML Disabling Events on Child Elements when moving Parent
- WndProc not called in hosted process in wpf
- AvalonDock : DockableContent Context Menu Shows wrong list of menus
- Change Font Family of the title of the Window WPF C#
- How to write out button event without using WPF controls?
- WPF - Draw tilted grid between two points
- WPF : Custom Button
- WPF routedevent storyboard begin only if height is zero
- WPF editable ComboBox SelectAll when clicked
- Add stack panel when check box is checked
Related Questions in ADORNER
- Creating an overlay to disable all other form elements
- Grouping rectangle for listbox
- WPF Drag and Drop a custom control to different control types
- Rotation maths not working correctly in WPF
- Adorner as popup not working
- c# Editable Text Block not retaining values
- wpf apply transforms when drawing drag adorner
- WPF: Multibind to absolute position
- Rotated Element creates issues with adorner
- WPF validation adorners - only show if the control has held focus before
- How to show a IsBusy flag when I have a collection of UI intensiv tasks each on its background thread?
- Resizing Adorner on simple Line?
- Adorner does not apply DataTemplates from Resources within ContentPresenter
- Can you have an adorner that extends outside of the bounds of the adorned control?
- Using more than 144 adorners
Related Questions in ADORNERLAYER
- Draw on top of Windows Forms control
- Clipping AdornerLayer
- How to hide an adorner?
- Is there always an Adorner Layer between a parent content control and its children?
- Validation ErrorTemplate not showing on data errors
- In WPF, how to display AdornerLayer on top of DataGrid
- Update text in adorner on button click
- Getting the coordinates of a specific ListViewItem relative to it's owning ListView
- WPF DataGrid and Adorners
- How to fire event under Adorner Layer
- Resize more than one different shape at same time using .net adorner
- Adorner not showing up
- No, an Adorner DOES NOT automagically take the DataContext of its AdornedElement in WPF
- Wpf Adorner not responding to interactions
- WPF Losing caret position when moving mouse over adorner in richtextbox
Related Questions in ADORNERDECORATOR
- WPF - validation adorners do not position correctly when there multiple controls with validation errors
- Validated Textbox in a UserControl
- Setting up multiple decorators with pico container
- How to hide an adorner?
- Update text in adorner on button click
- WPF IDataErrorInfo issues
- WPF DataGrid and Adorners
- WPF- Validation -The validation error message goes behind the other controls because of AdornerDecorator
- HwndSource does not display the Adorner layer
- AdornerDecorator that lets some adorners pass?
- WPF Moving Adorner outside the AdornerLayer or Window
- How to change AdornerLayer to show ValidationError (WPF)
- WPF TextBox with validation loses ErrorTemplate
- What's the point to WPF adorners?
- Error Adorner in a Scrollviewer
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You need to move adorner site from validated control to the main control(a descendant of RangeBase). To this, you can simply use the:
attached property to the TextBox.