Data binding validation
-
Hello, I have a tab control with two tabs in it,in each tab i have text boxes, the data of the text boxes is being validated using the IDataErrorInfo interface. If there is an invalid data i am rendering a red ellipsis and a tool tip box using this XAML code:
Text box XAML:
The problem is when i go to another tab and then come back again the red Ellipses are disappear. Help any one? Thanks
-
Hello, I have a tab control with two tabs in it,in each tab i have text boxes, the data of the text boxes is being validated using the IDataErrorInfo interface. If there is an invalid data i am rendering a red ellipsis and a tool tip box using this XAML code:
Text box XAML:
The problem is when i go to another tab and then come back again the red Ellipses are disappear. Help any one? Thanks
On Tab selection change event, give the datacontext to the textboxes. Say for example for first tab, you have 3 textboxes in a grid and you provide the class object to be bound as datacontext of the grid; when you select that tab, again give the same object as datacontext to the grid. grid.Datacontext = myClassObject; Please see if this works for you.
-
On Tab selection change event, give the datacontext to the textboxes. Say for example for first tab, you have 3 textboxes in a grid and you provide the class object to be bound as datacontext of the grid; when you select that tab, again give the same object as datacontext to the grid. grid.Datacontext = myClassObject; Please see if this works for you.
Hey, No it doesn't work. The problem is when i switch to another tab and the come back the red Ellipsis disappear. Thanks.