This question is locked. New answers and comments are not allowed.
Is there any way to get the SchedelureView to show the weeknumber in TimeRulerMajorTick.
This shows the day of week, but i need to show the week number...
FixedTickLengthProvider sevenDays =
new
FixedTickLengthProvider();
sevenDays.TickLength =
new
TimeSpan(7, 0, 0, 0, 0);
SchProjekt.ViewDefinitions.Add(
new
TimelineViewDefinition()
{
MajorTickLength = sevenDays,
Orientation = Orientation.Horizontal,
StretchGroupHeaders =
true
,
VisibleDays = 365,
Title =
"Projekt"
,
TimerulerGroupStringFormat =
"{0:MMM - yyyy}"
,
TimerulerMajorTickStringFormat =
"{0:ddd}"
,
MinTimeRulerExtent = 1600,
MaxTimeRulerExtent = 1600
});
This shows the day of week, but i need to show the week number...
public
static
int
GetWeekNumber(
this
DateTime date)
{
CultureInfo ci = CultureInfo.CurrentCulture;
int
wNr = ci.Calendar.GetWeekOfYear(date, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
return
wNr;
}