targetnullvalue

DataTemplate with TargetNullValue in a ListBox

I have the following DataTemplate in a Listbox <ListBox Grid.Column="1" Grid.Row="2" ItemsSource="{Binding People}" SelectedItem="{Binding SelectedPerson}"> <ListBox.ItemTemplate> <DataTemplate> <TextBlock OverridesDefaultStyle="True" Background="{x:Null}" Margin="0" Padding="0" IsHitTestVisible="True" T...

How do I set TargetNullValue to a date?

I'm using the WPF toolkit's Calendar control to allow users to select a date. If the date is not yet selected then the property the SelectedDate is bound to is Null. This makes the Calendar default you January 1, 0 AD. I'd like to do something like SelectedDate="{Binding UserPickedDate, TargetNullValue=Today, Mode=TwoWay}" But both "T...

WPF ObservableCollection: How to add a blank line in one form's combobox, but not actually affect the ObservableCollection?

I have a static ObservableCollection in a Data Repository class. I use it to populate a combobox on one of my forms (which needs to be able to include a blank line which represents NULL). I use the same ObservableCollection to populate a DataGrid, so I don't want the blank item in the actual ObservableCollection. How do I actually do th...