I can't quite express how big of a help these videos are Sean. You have a great way of explaining things. Thank you very much!!!
@longuinni4 жыл бұрын
Awesome tutorial!!! Finally one tutorial that explains the right way. Thanks Sean. Another suggestion is how to animate controls with storyboard.
@SingletonSean4 жыл бұрын
Thanks Fernando! Happy to hear this satisfied your INotifyDataErrorInfo request from earlier. I've touched on storyboard animations a bit in my Custom Controls playlist, but it would certainly be useful to dedicate a video to the topic. Great suggestion.
@robbienorton95222 жыл бұрын
Another Great WPF Tutotrial. This one I didn't have trouble follow your speed or have to slow the tutorial down. I do have to say it seems kind of a hokey way to not use inheritance or a viewmodelbase with error handling built in, but that's just me. Keep up the excellent work !! =)
@bullet42552 жыл бұрын
Concise and helpful, great job!
@islamabdel-fatah52102 жыл бұрын
Excellent work , thank you very much !
@dhruvsinha39073 жыл бұрын
Awesome tutorial !! Thank you
@andrijs15213 ай бұрын
i think this code from 8:00 is not in the repo
@amryakout29572 жыл бұрын
Great work 👏
@andreac12932 жыл бұрын
Thank you. Very useful tutorial. Just a question: How can I show only the first element of the errorContent in the adorner? On google I found this Text="{Binding [0].ErrorContent}" but it seems not working.
@hariprasadc8332 Жыл бұрын
I also want a placeholder in the textbox, so if I use stackpanel for the template its not working. And If I use Grid the error msg is comming inside the textbox. Is there any way to solve this issue?
@X3.notcom Жыл бұрын
Hi! Great tutorial! Wery helpful, but I can`t find unsubcribe "_errorsViewModel.ErrorsChanged -= ErrorsViewModel_ErrorsChanged;" in video
@hariprasadc8332 Жыл бұрын
Hi I am using INotifyDataErrorInfo in a user control and it validates if a textbox is null or empty. I have created an event in a interface invoked that event when there is any validation errors. I subscribed this event in another project by loading the dll of the above usercontrol and tried to subscribe to the event. But the event was not getting triggered in this project. I want to display the number of errors in the usercontrol and show the number of errors when the user clicks on next button.
@mattc41532 жыл бұрын
Nice work you know WPF well. Any chance you would be available for hire for a few hours for some Q&A? Thanks!
@hishoegypt1980 Жыл бұрын
Hi, i've a problem>>> _propertyErrors does not have GetValueOrDefault method, what should i do?
@MagoMakes9 ай бұрын
Same here - not sure how this guy magic'd a method in Dictionary!
@RustyAngelArm4 жыл бұрын
Thank you. The information about ErrorTamplate is very helpful to me. When I was choosing ways to implement INotifyDataErrorInfo, I ended up using Fody Validar + FluentValidation. And even if you don't want to use Fody, you can still use their INotifyDataErrorInfo example implementation: github.com/Fody/Validar#fluentvalidation Call it in the constructor like _validationTemplate = new ValidationTemplate(this);
@alejorostata38992 жыл бұрын
How would you trigger this, say on ICommand?
@clickdraw97622 жыл бұрын
The xaml part doesn't work form me in a .NET Framework 4.7.2 Application :(
@jadenschulz1004 Жыл бұрын
Data validation in wpf feels bad... so many edge cases, I can't figure out a truly mvvm way to do it. In your example here you can type letters into the field and still submit
@alanv.1743 жыл бұрын
Really great video and explanation, I just have one problem with it. If the user were to skip a mandatory field entirely there would be no error as the setter of the field wouldn't be called. Do you have a clean solution for this?
@SingletonSean3 жыл бұрын
Thanks Alan! Ironically, I've been doing a lot with forms lately. My approach has been to re-evaluate all of the validation when the user clicks the submit button. Here's a live example (not written by me): eo6en.csb.app/
@alanv.1743 жыл бұрын
@@SingletonSean Thank you! I'll be sure to check out the example. I ended up putting the validation in a method which also gets called when you press the button as temp solution. Cheers for all the informative content. Keep it up !
@altair911002 жыл бұрын
where's the method OnPropertyChanged?
@2005bgva2 жыл бұрын
Hi SingletonSean, thanks for this video, please, please could you activate subtitles?
@IT7kaya3 жыл бұрын
Not able to use GetValueOrDefault() for Dictionary
@BaNaNaJoE1852 жыл бұрын
You are probably using a different target framework... Try this: public IEnumerable GetErrors(string propertyName) { return _propertyErrors.ContainsKey(propertyName) ? _propertyErrors[propertyName] : null; }
@siavash21764 жыл бұрын
I wish there was a quick way without doing all this repetitive code on all projects, I hope with C# source generator this stuff get better, same for PropertyChanged, you have to have fields for each property and raise the property changed event, I use Prism and it makes it much easier but if there was a way to do it with an attribute it would be much better, anyway the video was great and very helpful like always, thanks!
@SingletonSean4 жыл бұрын
I agree Siavash. It is definitely repetitive to scaffold out all of these interface implementations, such as INotifyPropertyChanged and INotifyDataErrorInfo. Luckily those libraries ease the pain a bit, haha.
@r.o.93224 жыл бұрын
Very nice! But one thing I would have to say. Try to explain a bit more what you have to explain, not just go over some really important things like everybody already know them :) Thank u!
@SingletonSean4 жыл бұрын
Thanks R.O! I see what you mean. I try my best to stay on topic for my videos, so I do leave out some of the basic concepts. This helps the videos stay short and concise, and also helps people find exactly what they're looking for (sometimes). I would be frustrated if I was searching "cat" in the dictionary, but the definition of "cat" was nested in the middle of a paragraph about how to sing the ABCs (I hope that's a good analogy...). I will admit it does put people who are newer to WPF at a disadvantage, which is a shame because my content should help everyone grow. To balance this, I plan to put out more fundamental videos in the future, and then link to those videos whenever I explain something that might require additional knowledge. Thanks for the feedback R.O!