I have created a custom DatePicker which is inherited from DatePicker and added editable dependency property and set it to false in my XAML code
public static readonly DependencyProperty EditableProperty = DependencyProperty.Register("Editable", typeof(bool),
typeof(CustomDatePicker), new PropertyMetadata(true));
public bool Editable
{
get { return (bool)GetValue(EditableProperty); }
set { SetValue(EditableProperty, value); }
}
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
var textBox = GetTemplateChild("PART_TextBox") as Microsoft.Windows.Controls.Primitives.DatePickerTextBox;
var binding = new Binding { Source = this, Path = new PropertyPath(CustomDatePicker.EditableProperty) };
textBox.SetBinding(Microsoft.Windows.Controls.Primitives.
DatePickerTextBox.FocusableProperty, binding);
}