I have a DtaeTime Picker in my application as follows
and in the code behind
But when I run the app, there is no value set for The DateTimePicker control
<
Input:RadDateTimePicker
x:Name
=
"dateTimePicker"
Width
=
"150"
Margin
=
"3,0,0,0"
DateTimeWatermarkContent
=
"DateTime"
SelectedValue
=
"{Binding StartDateTime, Mode=TwoWay}"
VerticalAlignment
=
"Center"
SelectionChanged
=
"dateTimePicker_SelectionChanged"
/>
and in the code behind
private
DateTime _startDateTime = DateTime.Now;
public
DateTime StartDateTime
{
get
{
return
_startDateTime ;
}
set
{
if
(_startDateTime != value)
{
_startDateTime = value;
OnPropertyChanged(
"StartDateTime"
);
}
}
}
public
event
PropertyChangedEventHandler PropertyChanged;
private
void
OnPropertyChanged(
string
propertyName)
{
if
(
this
.PropertyChanged !=
null
)
{
this
.PropertyChanged(
this
,
new
PropertyChangedEventArgs(propertyName));
}
}
But when I run the app, there is no value set for The DateTimePicker control