'宣言 Public Overloads Function EnsureTimeSlotVisible( _ ByVal time As Date, _ ByVal forceIntoFirstTimeSlot As Boolean _ ) As Boolean
public bool EnsureTimeSlotVisible( DateTime time, bool forceIntoFirstTimeSlot )
Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click ' EnsureTimeSlotVisible can be called 3 different ways. ' Passing a datetime to indicate the desired timeslot time Me.UltraDayView1.EnsureTimeSlotVisible(New DateTime(1, 1, 1, 12, 15, 0), True) ' Passing an hour and minute to indicate the desired timeslot time. Me.UltraDayView1.EnsureTimeSlotVisible(12, 15, True) ' Passing the index of the desired timeslot. Me.UltraDayView1.EnsureTimeSlotVisible(Me.UltraDayView1.GetTimeSlotFromTime(New DateTime(1, 1, 1, 12, 15, 0)).Index, True) End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; private void button3_Click(object sender, System.EventArgs e) { // EnsureTimeSlotVisible can be called 3 different ways. // Passing a datetime to indicate the desired timeslot time this.ultraDayView1.EnsureTimeSlotVisible(new DateTime(1, 1, 1, 12, 15, 00), true); // Passing an hour and minute to indicate the desired timeslot time. this.ultraDayView1.EnsureTimeSlotVisible(12, 15, true); // Passing the index of the desired timeslot. this.ultraDayView1.EnsureTimeSlotVisible(this.ultraDayView1.GetTimeSlotFromTime(new DateTime(1, 1, 1, 12, 15, 00)).Index, true); }