idataerrorinfo Questions
3
I'm trying to set the Validation.ErrorTemplate of the DataGridCells, here's the xaml code:
<Style x:Key="{x:Type DataGridCell}" x:Uid="dataGridCellErrorTemplate" TargetType="{x:Type DataGridCel...
Trichinize asked 15/3, 2012 at 14:34
4
Solved
Can anyone tell me which is a better approach for Validation in WPF.
Implementing IDataErrorInfo
Creating ValidationRule
Throwing Exceptions
in terms of performance, memory leaks, code maintai...
Haemostat asked 5/6, 2010 at 15:3
3
Solved
I have a WPF application(.Net 3.5) which uses the IDataErrorInfo on the ViewModel to validate input.
It works great, the usercontrol get the correct UI feedback.
The problem is that the user can ...
Greybeard asked 28/11, 2012 at 10:47
15
Solved
So I have a WPF DataGrid, which is bound to an ObservableCollection. The collection has validation on its members, through IDataErrorInfo. If I edit a cell in a way so as to be invalid, and then ta...
Behalf asked 24/2, 2011 at 0:27
2
Solved
I have a TextBox bound to a property of an object which implements IDataErrorInfo.
I set up the Validation.ErrorTemplate of the TextBox, and it works fine. The problem is that I have these on a Ta...
Luminescent asked 1/3, 2010 at 12:20
1
Solved
What is the meaning of public string this[string columnName] When implementing IDataErrorInfo interface?
public string this[string columnName]
{
get
{
switch (columnName)
{
case "Name":
re...
Delius asked 28/3, 2016 at 14:50
1
Solved
In WPF there are 3 ways to do validation:
Validation Rules
IDataErrorInfo
INotifyDataErrorInfo
Is it possible to use a combination of these at the same time? For my needs, I would like to valid...
Janae asked 10/11, 2015 at 12:1
4
Solved
I have two date fields: StartDate and EndDate. StartDate must be earlier than EndDate.
If the user changes the StartDate to something greater than the EndDate, a red border appears around that Dat...
Handfasting asked 19/8, 2011 at 12:53
3
Solved
I'm trying to validate data in my MVVM application using IDataErrorInfo, but I'm running into some problems.
When I set my TextBox with an invalid value, the validation works fine. But after I set...
Ophthalmologist asked 21/6, 2010 at 17:22
3
Solved
I have a MVVM-based Window with many controls, and my Model implements IDataErrorInfo.
There is also a SaveCommand button, which performs validation by analysing Model.Error property.
The view d...
Gemination asked 3/4, 2012 at 2:20
3
Solved
I'm trying to implement validation in my WPF application using the IDataErrorInfo interface, and I've encountered a not-so-desirable situation.
I have this template which is used when a control fa...
Blakney asked 24/4, 2012 at 8:40
3
Solved
As a new WPF programer I cant find the difference between two different way to validate user input:
What are the pros and cons of writing custom validation rule against implementing IDataErrorInfo...
Maintain asked 5/12, 2010 at 13:15
1
Solved
I searched and did not see a solution.
I can only get the validation to show the tooltip if I do not set a tooltip in the combo box tooltip property. I would like to see the validation error toolt...
Geomorphology asked 19/8, 2013 at 23:51
4
Solved
i have an application that use the MVVM pattern and I would like to implement validation when the user is fill the information.
I would like to use the IDataErrorInfo, but I don't know if it is a ...
Overrefinement asked 23/7, 2013 at 14:58
2
Solved
I've always implemented the IDataErrorInfo interface without actually wondering what this line means and how it works.
string IDataErrorInfo.this[string propertyName]
{
get { return this.GetValid...
Toreador asked 21/6, 2013 at 13:27
1
Solved
How do you get the WPF error template to appear on a control within a UserControl in WPF?
I have a UserControl containing two Labels, two TextBoxes, and a CheckBox. One of the TextBoxes represent...
Reclusion asked 19/2, 2013 at 18:49
2
I have an object like that:
public class Person : IDataErrorInfo
{
public string PersonName{get;set;}
public int Age{get;set;}
string IDataErrorInfo.this[string propertyName]
{
get
{
if(pr...
Portrait asked 24/12, 2012 at 16:14
2
Solved
I have two controls on some panel: textbox and combobox:
<TextBox Text="{Binding ShapeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
<ComboBox Se...
Vinculum asked 14/11, 2012 at 12:3
1
I have a ViewModel class with a Phone object as one of its properties , my main window data context is set to the ViewModel, do I need to implement IDataErrorInfo on the underlying Phone model clas...
Merengue asked 28/10, 2012 at 22:44
3
I am using MVVM and I want to use IDataErrorInfo to validate my View.
My current implementation includes Nested objects and different ViewModels. e.g. Business Entity 'Customer' contains Business ...
Genuflect asked 17/9, 2012 at 11:32
1
Solved
Introduction
I have two TextBox in my view, each binded to some properties in my view-model (Property1, Property2).
TextBox are alternatively enabled upon some boolean, and properties, are valid...
Doubleganger asked 10/8, 2012 at 11:18
4
Solved
I am trying to validate my model class using IDataErrorInfo as given below.
//Validators
public string this[string propertyName] {
get {
string error = null;
if (propertyName == "Name") {
err...
Danidania asked 17/4, 2012 at 11:15
1
Solved
Using MVVM. I have a DataTemplate which I am using to display an expander with some controls in per object.
<DataTemplate>
<Expander ExpandDirection="Down" IsExpanded="False">
<E...
Mesics asked 11/6, 2012 at 10:16
1
Solved
Is there a preferred practice to do Data Validation from within your ViewModel?
Looking into it some people seem to prefer IDataErrorInfo and some prefer to roll out their own validation framework...
Pastoralist asked 23/5, 2011 at 19:46
2
Solved
Getting started with all this MVVM stuff, I was following this post by Josh Smith that talks about an approach to validation while using MVVM. The example is simple, and I began to wonder how I wou...
Shaver asked 15/4, 2011 at 14:24
1 Next >
© 2022 - 2024 — McMap. All rights reserved.