Click here to Skip to main content
15,902,635 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Bind ObservableCollection to a Grid Pin
Gideon Engelberth13-Nov-08 8:16
Gideon Engelberth13-Nov-08 8:16 
GeneralRe: Bind ObservableCollection to a Grid Pin
ezazazel13-Nov-08 9:55
ezazazel13-Nov-08 9:55 
GeneralRe: Bind ObservableCollection to a Grid Pin
Gideon Engelberth13-Nov-08 12:47
Gideon Engelberth13-Nov-08 12:47 
GeneralRe: Bind ObservableCollection to a Grid [modified] Pin
Mark Salsbery14-Nov-08 12:40
Mark Salsbery14-Nov-08 12:40 
GeneralRe: Bind ObservableCollection to a Grid Pin
ezazazel15-Nov-08 1:54
ezazazel15-Nov-08 1:54 
GeneralRe: Bind ObservableCollection to a Grid Pin
Mark Salsbery15-Nov-08 6:46
Mark Salsbery15-Nov-08 6:46 
GeneralRe: Bind ObservableCollection to a Grid Pin
Mark Salsbery15-Nov-08 7:15
Mark Salsbery15-Nov-08 7:15 
QuestionComboBox's SelectedValue set to null when changing templates PinPopular
James J. Foster12-Nov-08 4:56
James J. Foster12-Nov-08 4:56 
I am using the MVVM pattern, and have a multi-screen data entry form. There is a single VM with an ActiveScreen property that uses INotifyPropertyChanged events. Templates are used by the View based on the current ActiveScreen.

On one of the screens, I have a ComboBox that is bound to a List<> for its ItemsSource. I am using the MVVM pattern, and the selected value of the Combobox is twoway bound to a property on my model. All works fine when you are on the screen entering data.

When the user changes the ActiveScreen, and hence a new template is used in the View, a weird thing happens. The property on the model bound to the combobox is set to NULL. Looking at the call stack, I see the ActiveScreen property change event, then a bunch of WPF code, and then my property setter. The count in the collection on the combobox at that point is 0.

It seems as if WPF does some cleanup of the combobox by removing all the items, which sets the selecteditem to null, and because of my binding, it changes my model. The net effect is I lose the data entered by the user. The other elements on that screen (textboxes, datepickers, etc) do not have this problem, so it's clearly something with the ComboBox.

Has anyone hit this before, and know of a solution? The problem is, I want the user to be able to select a blank value, so I don't know if it's the user setting the value to null or this odd series of events.
QuestionAdobe Illustrator exporter to XAML Pin
DaveX8611-Nov-08 16:50
DaveX8611-Nov-08 16:50 
Questionhow can i read files from my silverlight 2 web folder Pin
ahmedhassan9611-Nov-08 12:41
ahmedhassan9611-Nov-08 12:41 
AnswerRe: how can i read files from my silverlight 2 web folder Pin
lneir12-Nov-08 18:42
lneir12-Nov-08 18:42 
QuestionWPF-Callable Folder Browser Source Code [modified] Pin
Mark Salsbery11-Nov-08 11:40
Mark Salsbery11-Nov-08 11:40 
AnswerRe: WPF-Callable Folder Browser Source Code Pin
Pete O'Hanlon11-Nov-08 11:44
mvePete O'Hanlon11-Nov-08 11:44 
GeneralRe: WPF-Callable Folder Browser Source Code Pin
Mark Salsbery11-Nov-08 11:55
Mark Salsbery11-Nov-08 11:55 
AnswerRe: WPF-Callable Folder Browser Source Code Pin
Jammer12-Nov-08 0:52
Jammer12-Nov-08 0:52 
GeneralRe: WPF-Callable Folder Browser Source Code Pin
Mark Salsbery12-Nov-08 8:41
Mark Salsbery12-Nov-08 8:41 
QuestionAdding events to objects in application.resources Pin
Rferj11-Nov-08 10:22
Rferj11-Nov-08 10:22 
AnswerRe: Adding events to objects in application.resources Pin
ColinM12311-Nov-08 11:19
ColinM12311-Nov-08 11:19 
GeneralUnable to upload file more than 35 kb using WCF Web service Pin
Vipul Mehta11-Nov-08 3:59
Vipul Mehta11-Nov-08 3:59 
QuestionRunning a method in secondary second of a storyboard ? Pin
Mohammad Dayyan10-Nov-08 22:51
Mohammad Dayyan10-Nov-08 22:51 
AnswerRe: Running a method in secondary second of a storyboard ? Pin
lneir12-Nov-08 19:09
lneir12-Nov-08 19:09 
GeneralRe: Running a method in secondary second of a storyboard ? Pin
Mohammad Dayyan13-Nov-08 8:31
Mohammad Dayyan13-Nov-08 8:31 
QuestionDecimal separator and textboxes Pin
Gian10-Nov-08 8:14
Gian10-Nov-08 8:14 
AnswerRe: Decimal separator and textboxes Pin
Thomas Stockwell11-Nov-08 3:07
professionalThomas Stockwell11-Nov-08 3:07 
QuestionIs there a FolderBrowserDialog in WPF ? Pin
Mohammad Dayyan10-Nov-08 6:14
Mohammad Dayyan10-Nov-08 6:14 

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.