バージョン

EnsureOwnerInView メソッド

指定された Owner を表示します。
シンタックス
'宣言
 
Public Sub EnsureOwnerInView( _
   ByVal owner As Owner, _
   ByVal forceFirst As Boolean _
) 
public void EnsureOwnerInView( 
   Owner owner,
   bool forceFirst
)

パラメータ

owner
表示される Owner
forceFirst
Owner がコントロールによって表示される新しい最初の表示されるオーナーになるかどうかを指定します。
解説

注:forceFirst パラメーターに True が設定されていますが、UltraCalendarInfo.VisibleOwners コレクション内の指定されたオーナーの位置が最初の表示される Owner にすることができない場合、パラメーターの値は適用できません。

注: 指定された owner が非表示の場合 (その Owner.Visible プロパティが False に設定されます)、このメソッドは Owner.Visible プロパティの値を変更しません。この場合、メソッドは効果がありません。

使用例
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        '	Clear the Owners collection
        Me.ultraWeekView1.CalendarInfo.Owners.Clear()

        '	Hide the unassigned owner
        Me.ultraWeekView1.CalendarInfo.Owners.UnassignedOwner.Visible = False

        '	Clear the Owners collection
        Me.ultraWeekView1.CalendarInfo.Owners.Clear()

        '	Hide the unassigned owner
        Me.ultraWeekView1.CalendarInfo.Owners.UnassignedOwner.Visible = False

        '	Add some owners
        Dim i As Int32
        For i = 0 To 9
            Me.ultraWeekView1.CalendarInfo.Owners.Add("ID_" + i.ToString(), "Owner " + i.ToString())
        Next i

        '	Set the OwnerDisplayStyle property to 'Separate' so that
        '	owners are displayed separately
        Me.ultraWeekView1.OwnerDisplayStyle = OwnerDisplayStyle.Separate

        '	Set the OwnerNavigationStyle property to Scrollbar so the end user
        '	can navigate through owners with a horizontal scrollbar
        Me.ultraWeekView1.OwnerNavigationStyle = OwnerNavigationStyle.Scrollbar

        '	Set the MaximumOwnersInView property to 2 so the end user can view
        '	up to 2 owners at a time
        Me.ultraWeekView1.MaximumOwnersInView = 2

        '	Get a reference to the last owner in the collection
        Dim lastOwner As Infragistics.Win.UltraWinSchedule.Owner = Me.ultraWeekView1.CalendarInfo.Owners(Me.ultraWeekView1.CalendarInfo.Owners.Count - 1)

        '	Use the 'IsOwnerInView' method to determine whether the last owner is in view
        Dim isInView As Boolean = Me.ultraWeekView1.IsOwnerInView(lastOwner)

        '	If the owner is not in view, use the EnsureOwnerInView method to bring it into view.
        If isInView = False Then
            Me.ultraWeekView1.EnsureOwnerInView(lastOwner, False)
        End If

    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using System.Diagnostics;

		private void button1_Click(object sender, System.EventArgs e)
		{
			//	Clear the Owners collection
			this.ultraWeekView1.CalendarInfo.Owners.Clear();

			//	Hide the unassigned owner
			this.ultraWeekView1.CalendarInfo.Owners.UnassignedOwner.Visible = false;

			//	Add some owners
			for ( int i = 0; i < 10; i ++ )
			{
				this.ultraWeekView1.CalendarInfo.Owners.Add( "ID_" + i.ToString(), "Owner " + i.ToString() );
			}

			//	Set the OwnerDisplayStyle property to 'Separate' so that
			//	owners are displayed separately
			this.ultraWeekView1.OwnerDisplayStyle = OwnerDisplayStyle.Separate;

			//	Set the OwnerNavigationStyle property to Scrollbar so the end user
			//	can navigate through owners with a horizontal scrollbar
			this.ultraWeekView1.OwnerNavigationStyle = OwnerNavigationStyle.Scrollbar;

			//	Set the MaximumOwnersInView property to 2 so the end user can view
			//	up to 2 owners at a time
			this.ultraWeekView1.MaximumOwnersInView = 2;

			//	Get a reference to the last owner in the collection
			Infragistics.Win.UltraWinSchedule.Owner lastOwner = this.ultraWeekView1.CalendarInfo.Owners[this.ultraWeekView1.CalendarInfo.Owners.Count - 1];

			//	Use the 'IsOwnerInView' method to determine whether the last owner is in view
			bool isInView = this.ultraWeekView1.IsOwnerInView( lastOwner );

			//	If the owner is not in view, use the EnsureOwnerInView method to bring it into view.
			if ( isInView == false )
				this.ultraWeekView1.EnsureOwnerInView( lastOwner, false );
		}
参照