My requirement is to align the DatePicker
button and calender to the extreme right in the DatePicker
control (only through code behind). I am creating a DatePicker
control which is dynamically generated if the data type is date.
Here's the present code:
if (type.ToLower() == "date")
{
control = new DatePicker();
(control as DatePicker).Name = name;
(control as DatePicker).FontSize = 24;
(control as DatePicker).FontWeight = FontWeights.Light;
(control as DatePicker).MinWidth = 450;
(control as DatePicker).HorizontalContentAlignment = HorizontalAlignment.Left;
(control as DatePicker).VerticalAlignment = VerticalAlignment.Center;
}
Just wanted to know, What extra i should write to keep the DatePicker
button at the right such that
the calender also should open at the right i.e to the bottom of the DatePicker
button.