Compartir a través de


DatePicker.FirstDayOfWeek Propiedad

Definición

Obtiene o establece el día que se considera el principio de la semana.

public:
 property DayOfWeek FirstDayOfWeek { DayOfWeek get(); void set(DayOfWeek value); };
public DayOfWeek FirstDayOfWeek { get; set; }
member this.FirstDayOfWeek : DayOfWeek with get, set
Public Property FirstDayOfWeek As DayOfWeek

Valor de propiedad

DayOfWeek que representa el principio de la semana. El valor predeterminado es el valor de FirstDayOfWeek que viene definido por la referencia cultural actual.

Ejemplos

En el ejemplo siguiente se crea un DatePicker objeto que muestra el lunes como primer día de la semana.

DatePicker datePickerFor2009 = new DatePicker();
datePickerFor2009.SelectedDate = new DateTime(2009, 3, 23);
datePickerFor2009.DisplayDateStart = new DateTime(2009, 1, 1);
datePickerFor2009.DisplayDateEnd = new DateTime(2009, 12, 31);
datePickerFor2009.SelectedDateFormat = DatePickerFormat.Long;
datePickerFor2009.FirstDayOfWeek = DayOfWeek.Monday;

// root is a Panel that is defined elsewhere.
root.Children.Add(datePickerFor2009);
Dim datePickerFor2009 As New DatePicker()
datePickerFor2009.SelectedDate = New DateTime(2009, 3, 23)
datePickerFor2009.DisplayDateStart = New DateTime(2009, 1, 1)
datePickerFor2009.DisplayDateEnd = New DateTime(2009, 12, 31)
datePickerFor2009.SelectedDateFormat = DatePickerFormat.[Long]
datePickerFor2009.FirstDayOfWeek = DayOfWeek.Monday

' root is a Panel that is defined elsewhere. 
root.Children.Add(datePickerFor2009)
<!-- A DatePicker that has March 23, 2009 selected and 
           displays the Long date format. -->
<DatePicker SelectedDateFormat="Long" SelectedDate="3/23/09"
                  DisplayDateStart="1/01/09" DisplayDateEnd="12/31/09" 
                  FirstDayOfWeek="Monday"/>

Comentarios

Esta propiedad afecta al Calendar de .DatePicker Para obtener más información, vea la propiedad Calendar.FirstDayOfWeek.

Información sobre propiedades de dependencia

Campo identificador FirstDayOfWeekProperty
Propiedades de metadatos establecidas en true Ninguno

Uso de atributos XAML

<DatePicker FirstDayOfWeek=""DayOfWeek/>

Se aplica a