Click here to Skip to main content
15,891,976 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: User must not be able to open same site again in other browser or tab Pin
Simon Bang Terkildsen9-Sep-11 9:08
Simon Bang Terkildsen9-Sep-11 9:08 
QuestionHow to place a multiple window controls inside one window control in WPF Pin
Rocky236-Sep-11 1:52
Rocky236-Sep-11 1:52 
AnswerRe: How to place a multiple window controls inside one window control in WPF Pin
Wayne Gaylard6-Sep-11 2:13
professionalWayne Gaylard6-Sep-11 2:13 
GeneralRe: How to place a multiple window controls inside one window control in WPF Pin
Rocky236-Sep-11 2:47
Rocky236-Sep-11 2:47 
GeneralRe: How to place a multiple window controls inside one window control in WPF Pin
Pete O'Hanlon6-Sep-11 2:57
mvePete O'Hanlon6-Sep-11 2:57 
GeneralRe: How to place a multiple window controls inside one window control in WPF Pin
Wayne Gaylard6-Sep-11 3:00
professionalWayne Gaylard6-Sep-11 3:00 
AnswerRe: How to place a multiple window controls inside one window control in WPF Pin
Pete O'Hanlon6-Sep-11 2:15
mvePete O'Hanlon6-Sep-11 2:15 
QuestionWPF - basic data binding and "Save" x "Cancel changes" Pin
Member 10339075-Sep-11 5:33
Member 10339075-Sep-11 5:33 
Suppose I have a window where user edits some details directly bound to a class (like TextBox for Person.FirstName and similar other controls). Now, such forms typicaly have "OK" and "Cancel" buttons where one saves the changes while the other leaves the data intact. If I use data binding like
<TextBox Text="{Binding Person.FirstName}" />

etc., the data is saved (to the in-memory Person object) with each change of the data in the controls. How do I cancel the changes (revert to the previous state) when the user clicks the Cancel button? I think I could use one-way data binding and somehow say "bind both ways this time" when the user clicks "Ok", but I don't know how to do that.
What is the best way how to deal with this fairly common scenario? (I would like to take advantage of data binding, if possible)
Thanks for any help, H.
AnswerRe: WPF - basic data binding and "Save" x "Cancel changes" Pin
Pete O'Hanlon5-Sep-11 5:40
mvePete O'Hanlon5-Sep-11 5:40 
GeneralRe: WPF - basic data binding and "Save" x "Cancel changes" Pin
SledgeHammer019-Sep-11 10:01
SledgeHammer019-Sep-11 10:01 
GeneralRe: WPF - basic data binding and "Save" x "Cancel changes" Pin
SledgeHammer019-Sep-11 10:46
SledgeHammer019-Sep-11 10:46 
GeneralRe: WPF - basic data binding and "Save" x "Cancel changes" Pin
SledgeHammer019-Sep-11 11:14
SledgeHammer019-Sep-11 11:14 
GeneralRe: WPF - basic data binding and "Save" x "Cancel changes" Pin
SledgeHammer019-Sep-11 12:47
SledgeHammer019-Sep-11 12:47 
GeneralRe: WPF - basic data binding and "Save" x "Cancel changes" Pin
Alisaunder12-Sep-11 6:32
Alisaunder12-Sep-11 6:32 
GeneralRe: WPF - basic data binding and "Save" x "Cancel changes" Pin
SledgeHammer0112-Sep-11 6:44
SledgeHammer0112-Sep-11 6:44 
GeneralRe: WPF - basic data binding and "Save" x "Cancel changes" Pin
Member 103390713-Sep-11 22:47
Member 103390713-Sep-11 22:47 
GeneralRe: WPF - basic data binding and "Save" x "Cancel changes" Pin
Pete O'Hanlon13-Sep-11 22:59
mvePete O'Hanlon13-Sep-11 22:59 
GeneralRe: WPF - basic data binding and "Save" x "Cancel changes" Pin
Member 103390714-Sep-11 2:05
Member 103390714-Sep-11 2:05 
GeneralRe: WPF - basic data binding and "Save" x "Cancel changes" Pin
Pete O'Hanlon14-Sep-11 2:15
mvePete O'Hanlon14-Sep-11 2:15 
GeneralRe: WPF - basic data binding and "Save" x "Cancel changes" Pin
Mycroft Holmes13-Sep-11 23:27
professionalMycroft Holmes13-Sep-11 23:27 
GeneralRe: WPF - basic data binding and "Save" x "Cancel changes" Pin
Pete O'Hanlon14-Sep-11 23:13
mvePete O'Hanlon14-Sep-11 23:13 
QuestionCall the client program Pin
luozi20114-Sep-11 14:55
luozi20114-Sep-11 14:55 
AnswerRe: Call the client program Pin
Pete O'Hanlon4-Sep-11 20:08
mvePete O'Hanlon4-Sep-11 20:08 
QuestionConverting an Bitmap to ImageSource problem Pin
Mike Hankey4-Sep-11 10:31
mveMike Hankey4-Sep-11 10:31 
AnswerRe: Converting an Bitmap to ImageSource problem Pin
RichardGrimmer5-Sep-11 5:25
RichardGrimmer5-Sep-11 5:25 

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.