FindNearestItem() публичный Метод

public FindNearestItem ( SearchDirectionHint dir, Point point ) : System.Windows.Forms.ListViewItem
dir SearchDirectionHint
point System.Drawing.Point
Результат System.Windows.Forms.ListViewItem
Пример #1
0
		public void FindNearestItem_Exceptions ()
		{
			ListView lvw = new ListView ();
			lvw.Items.Add ("A");
			lvw.Items.Add ("B");

			lvw.View = View.Details;
			try {
				lvw.FindNearestItem (SearchDirectionHint.Down, 0, 0);
				Assert.Fail ("#A1");
			} catch (InvalidOperationException) {
			}

			lvw.View = View.List;
			try {
				lvw.FindNearestItem (SearchDirectionHint.Down, 0, 0);
				Assert.Fail ("#A2");
			} catch (InvalidOperationException) {
			}

			lvw.View = View.Tile;
			try {
				lvw.FindNearestItem (SearchDirectionHint.Down, 0, 0);
				Assert.Fail ("#A3");
			} catch (InvalidOperationException) {
			}

			lvw.View = View.LargeIcon;
			try {
				lvw.FindNearestItem ((SearchDirectionHint)666, 0, 0);
			} catch (ArgumentOutOfRangeException) {
			}
		}