Hi,
You can customize the texts displayed in the timelines of the Resource view through the Format property of the respective TimelineSettings object, that is, ResourceViewSettings.TopTimelineSettings, ResourceViewSettings.MiddleTimelineSettings, and ResourceViewSettings.BottomTimelineSettings for the top, middle, and bottom timelines respectively. The accepted values for the Format property are the standard date and time formatting specifiers, as outlined in the
Custom Date and Time Format Strings topic of the MSDN documentation. However, I don't think there is a specifier for just the first letter of the day of the week.
You have the following two options:
You can set the format to "ddd" (The abbreviated name of the day of the week.) and replace the abbreviated day names globally, by setting the Calendar.DateTimeFormat.AbbreviatedDayNames:
calendar.DateTimeFormat.AbbreviatedDayNames = New String() {"S", "M", "T", "W", "T", "F", "S"}
Specifying uppercase month names can be done in a similar fashion by setting the Calendar.DateTimeFormat.MonthNames property. Keep in mind that this will affect the display of the abbreviated day names and months throughout the entire control.
Alternatively, you can handle the Calendar.CustomizeText event and provide the texts yourself. To provide texts for the resource view timelines, you need to check if the value of the Element property of the event argument equals CalendarTextElements.ResourceViewTimeline. You need to analyze the date of the cell being processed and return a corresponding text value. The following event handler returns uppercase month names for the cells in the middle timeline and a single-letter day names for the cells in the bottom timeline:
If e.Element = CalendarTextElements.ResourceViewTimeline Then
If e.Index = 1 Then
' Middle timeline
e.Text = calendar.DateTimeFormat.MonthNames(e.[Date].Month - 1).ToUpper()
ElseIf e.Index = 2 Then
' Bottom timeline
e.Text = calendar.DateTimeFormat.AbbreviatedDayNames(CInt(e.[Date].DayOfWeek))(0).ToString()
End If
End If
Let me know if this helps.
Regards,
Meppy