Hi !
I've got a simple project with a ScheduleView in the MainWindow. The constructor code is as follows:
public MainWindow()
{
InitializeComponent();
m_scheduleView.AppointmentsSource = new List<Appointment>();
// Init the schedule view
m_scheduleView.ViewDefinitions.Add(
new WeekViewDefinition()
{
FirstDayOfWeek = DayOfWeek.Sunday,
VisibleDays = 7,
TimerulerMajorTickStringFormat = "{0:H:mm}"
} );
m_scheduleView.ViewDefinitions.Add(
new MonthViewDefinition()
{
FirstDayOfWeek = DayOfWeek.Sunday
} );
// Make the beginning of the schedule read-only.
var excludedRange = new ObservableCollection<Slot>();
excludedRange.Add( new Slot( DateTime.MinValue, new DateTime( 2011, 10, 22 ) ) { IsReadOnly = true } );
m_scheduleView.SpecialSlotsSource = excludedRange;
m_scheduleView.ScrollIntoView( new Slot( new DateTime( 2011, 10, 23 ), new DateTime( 2011, 10, 24 ) ) );
}
What I'm trying to do here is make the schedule read-only up to a certain date, then scroll the following day into view.
However, the last line, where I attempt to scroll a date into view, doesn't work.
Am I missing something or was this broken in SP1 ?
Thanks,
Sebastien
I've got a simple project with a ScheduleView in the MainWindow. The constructor code is as follows:
public MainWindow()
{
InitializeComponent();
m_scheduleView.AppointmentsSource = new List<Appointment>();
// Init the schedule view
m_scheduleView.ViewDefinitions.Add(
new WeekViewDefinition()
{
FirstDayOfWeek = DayOfWeek.Sunday,
VisibleDays = 7,
TimerulerMajorTickStringFormat = "{0:H:mm}"
} );
m_scheduleView.ViewDefinitions.Add(
new MonthViewDefinition()
{
FirstDayOfWeek = DayOfWeek.Sunday
} );
// Make the beginning of the schedule read-only.
var excludedRange = new ObservableCollection<Slot>();
excludedRange.Add( new Slot( DateTime.MinValue, new DateTime( 2011, 10, 22 ) ) { IsReadOnly = true } );
m_scheduleView.SpecialSlotsSource = excludedRange;
m_scheduleView.ScrollIntoView( new Slot( new DateTime( 2011, 10, 23 ), new DateTime( 2011, 10, 24 ) ) );
}
What I'm trying to do here is make the schedule read-only up to a certain date, then scroll the following day into view.
However, the last line, where I attempt to scroll a date into view, doesn't work.
Am I missing something or was this broken in SP1 ?
Thanks,
Sebastien