All Questions
19 questions
0
votes
2
answers
474
views
WPF Can't Remove Red Border from UserControl
I've built a simple login page and when invalid input is detected, a red border is drawn around the usercontrol.
Here is my layout code:
<UserControl x:Class="WPFTest.UI.Views.EmptyLayout&...
3
votes
0
answers
685
views
WPF validation error style in reuseable UserControl?
I have made a reusable UserControl in my WPF application that has a Textbox (and in the real project other components) inside of it. I'm using Fluent Validation with INotifyDataErrorInfo to validate ...
0
votes
1
answer
48
views
Show UserControl as invalid when DependencyProperty is invalid
I have user control which works as a vendor selector. It displays the currently selected vendor name and uses a button to display a vendor selection dialog.
<PO:VendorSelector VendorId="{...
1
vote
1
answer
66
views
WPF UserControl: Client-side validation of TargetType for custom styles?
I have a UserControl for multi-purpose use.
For the sake of simplicity, I'll show you the control first:
<UserControl x:Class="CompetitionAgent.View.UserControls.ExpandingButtonGrid"
...
3
votes
2
answers
752
views
WPF. Understanding error validation inside a UserControl with MVVM
I'm trying to validate a form in a UserControl element that is being used by another UserControl that is inside a Window.
I'm using MVVM pattern and i'm implementing the INotifyDataErrorInfo in the ...
1
vote
2
answers
2k
views
Accessing Validation Errors in a UserControl
I created a WPF (.Net 4) UserControl containing some ComboBoxes and a TextBox. In XAML, some ValidationRules are bound to the TextBox. If the TextBox contains invalid data, a red frame is shown, and ...
3
votes
0
answers
543
views
Issue with WPF validation(IDataErrorInfo) and loading User control Dynamically
I have a user control and i use (IDataErrorInfo) for validation the problem is when i load User control Dynamically the validation not appears for the first time but when i load it in design time it ...
0
votes
1
answer
213
views
bind user control to contentcontrol validation rules not firing
I have many user controls and i have main window which contains a content control and list box when user select from list box i bound the selected user control to the content control the problem is ...
0
votes
1
answer
223
views
How to remove Validation Display Error box shown on top in wpf?
In my wpf user control, I have a text box with an error validation box. and it works fine. but when I reduce screen size, the error box comes top to next panel aside the text box, when the text box ...
0
votes
3
answers
3k
views
Validation.ErrorTemplate not shown
I have a MainWindow and a UserControl. The MainWindow shows the UserControl.
The UserControl itself following the MVVM pattern and implements the IDataErrorInfo Interface in the ViewModel. This works ...
0
votes
1
answer
915
views
WPF - Style validation error of UserControl
I have implemented validation within my application using DataAnnotations and INotifyDataError and can successfully show when an error occurs and what the error is. I wish to change the default error ...
0
votes
1
answer
2k
views
ErrorTemplate showing for the user control and not the text box within it! How to fix?
There are similar questions to this one on here however I have tried the mentioned solutions to no avail!
Let me just run you through the setup - I have a model which implements IDataErrorInfo, a ...
1
vote
2
answers
3k
views
Validated Textbox in a UserControl
I have created a UserControl - a Labeled TextBox which is working pretty well, except for the validation template. When there's an error the validation control template shows up but it fills the whole ...
1
vote
3
answers
904
views
DependencyProperty validation is not called from data template (only in .NET 4.0)
There is a problem in .NET 4.0, which does not exist in 3.5 (have not tested earlier or later frameworks).
I have created a demo user control, which has only a single property Num (of type Integer):
...
2
votes
3
answers
1k
views
Advanced WPF Validation
Could anybody provide any link to tutorial which fully explains WPF validation.
I'm not interested in reviews, I'm interesting in MVVM-style validation using IDataErrorInfo.
There are a lot of ...
1
vote
1
answer
829
views
How to checks that whether UserControl is Valid or not
I have a textbox inside usercontrol that implements ValidationRule and it is working fine, now in the window where i'm using this control has one button, and i want that button to be disabled if ...
0
votes
1
answer
454
views
Edit Validation.ErrorTemplate in code
I have a UserControl that contains a TextBox. The TextBox.Text property is data-bound and validated. When a Validation.Error occurs, I would like to edit the Validation.ErrorTemplate. Specifically, I ...
0
votes
1
answer
2k
views
Why doesn't the Validation.Error event get fired in this case?
I have copied an example from MSDN and added the Validation.Error event. Problem is, it never gets fired. Why not?
<UserControl x:Class="MeasurementControl"
xmlns="http://schemas....
0
votes
1
answer
2k
views
WPF: Clearing all errormessages in an elegant way
I'm a complete beginner at WPF.
I've made a usercontrol "labeledTextbox" that holds a label, a textbox and a textblock for errormessages.
When the user hits the submit button, I call ...