Click here to Skip to main content
15,910,234 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: General question on MVVM Pin
Alisaunder15-Jun-12 2:56
Alisaunder15-Jun-12 2:56 
QuestionPLEASE HELP THE WAY IT CAN BE ACHIEVED Pin
formulaone877-Jun-12 0:33
formulaone877-Jun-12 0:33 
AnswerRe: PLEASE HELP THE WAY IT CAN BE ACHIEVED Pin
Mycroft Holmes7-Jun-12 13:04
professionalMycroft Holmes7-Jun-12 13:04 
GeneralRe: PLEASE HELP THE WAY IT CAN BE ACHIEVED Pin
formulaone878-Jun-12 0:53
formulaone878-Jun-12 0:53 
QuestionCopy/Pasting excel data into the WPF Rich Textbox loses formatting Pin
sundherrajan6-Jun-12 21:17
sundherrajan6-Jun-12 21:17 
AnswerRe: Copy/Pasting excel data into the WPF Rich Textbox loses formatting Pin
Mycroft Holmes7-Jun-12 0:00
professionalMycroft Holmes7-Jun-12 0:00 
QuestionRequired field Validation in WPF Pin
User-84353845-Jun-12 5:43
User-84353845-Jun-12 5:43 
AnswerRe: Required field Validation in WPF Pin
Unnikrishnan_S_N3-Jul-12 2:44
Unnikrishnan_S_N3-Jul-12 2:44 
Hi SelvaKathir,

I assume you have implemented the following things for triggering the Error.
1. Viewmodel implements IDataErrorInfo interface.

2. Set ValidationAttribute on each property which has to be validated or Use SelfValidation attribute on the class and override DoValidate.

3. Controls in Xaml are using bindings and ValidatesOnDataErrors=true,NotifyOnValidationError=true

4. Use a textblock to display the error by binding the error content of the target field. "<TextBlock Text="{Binding Validation.Errors)[0].ErrorContent, ElementName=YourTargetTextBox />"

5. Now how to display the error content on Save?
You have to set a boolean flag in ViewModel such as CanErrorDisplay and set it to true on Save.

6. Override the ErrorTemplate style and put conditional trigger on CanErrorDisplay and Validation.HasError to display Error.

This should work as per your requirement.
QuestionNot able to drag and drop WPF controls on to window in Visual Studio 2008 Pin
Anurag Sinha V4-Jun-12 0:25
Anurag Sinha V4-Jun-12 0:25 
AnswerRe: Not able to drag and drop WPF controls on to window in Visual Studio 2008 Pin
Abhinav S5-Jun-12 0:47
Abhinav S5-Jun-12 0:47 
GeneralRe: Not able to drag and drop WPF controls on to window in Visual Studio 2008 Pin
Anurag Sinha V5-Jun-12 2:56
Anurag Sinha V5-Jun-12 2:56 
QuestionSilverlight client 4.0 application listboxs not working with the new Sliverlight 5.1 client Pin
Steve Holdorf3-Jun-12 12:21
Steve Holdorf3-Jun-12 12:21 
AnswerRe: Silverlight client 4.0 application listboxs not working with the new Sliverlight 5.1 client Pin
vinodkrebc7-Jun-12 0:04
vinodkrebc7-Jun-12 0:04 
QuestionWhich platform for a simple platform game to play by web rend erer ? Pin
EternallyConfuzzled31-May-12 22:28
EternallyConfuzzled31-May-12 22:28 
AnswerRe: Which platform for a simple platform game to play by web rend erer ? Pin
Abhinav S3-Jun-12 19:33
Abhinav S3-Jun-12 19:33 
QuestionComboBox MVVM Issue Pin
wasimsharp31-May-12 21:29
wasimsharp31-May-12 21:29 
AnswerRe: ComboBox MVVM Issue Pin
Alisaunder2-Jun-12 6:24
Alisaunder2-Jun-12 6:24 
QuestionWPF TreeView jumps up Pin
Mc_Topaz30-May-12 1:09
Mc_Topaz30-May-12 1:09 
AnswerRe: WPF TreeView jumps up Pin
Gerry Schmitz30-May-12 8:21
mveGerry Schmitz30-May-12 8:21 
QuestionSet webcam brightness in Silverlight Pin
ebrahim rajabloo29-May-12 19:28
ebrahim rajabloo29-May-12 19:28 
QuestionINotifyPropertyChanged on Interface class property? Pin
Adam_Dev29-May-12 1:02
Adam_Dev29-May-12 1:02 
AnswerRe: INotifyPropertyChanged on Interface class property? Pin
Pete O'Hanlon29-May-12 2:26
mvePete O'Hanlon29-May-12 2:26 
GeneralRe: INotifyPropertyChanged on Interface class property? Pin
Adam_Dev29-May-12 2:35
Adam_Dev29-May-12 2:35 
GeneralRe: INotifyPropertyChanged on Interface class property? Pin
Pete O'Hanlon29-May-12 2:49
mvePete O'Hanlon29-May-12 2:49 
GeneralRe: INotifyPropertyChanged on Interface class property? Pin
Adam_Dev29-May-12 2:51
Adam_Dev29-May-12 2:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.