Base:
property
Position
System.Windows.Forms.BindingManagerBase.Position
9 writes to Position
System.Windows.Forms (4)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
2626
DataManager.
Position
= SelectedIndex;
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (1)
1362
CurrencyManager.
Position
= e.RowIndex;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
1901
DataManager.
Position
= SelectedIndex;
System\Windows\Forms\DataBinding\BindingSource.cs (1)
369
_currencyManager.
Position
= value;
System.Windows.Forms.Tests (5)
System\Windows\Forms\ListBoxTests.cs (3)
2450
control.DataManager.
Position
= position;
2932
control.DataManager.
Position
= position;
5826
control.DataManager.
Position
= position;
System\Windows\Forms\ListControlTests.cs (2)
350
control.DataManager.
Position
= 1;
366
control.DataManager.
Position
= 1;
76 references to Position
System.Windows.Forms (45)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (4)
2621
if (DataManager is not null && DataManager.
Position
!= SelectedIndex)
3017
SelectedIndex = DataManager.
Position
;
3290
PInvokeCore.SendMessage(this, PInvoke.CB_SETCURSEL, (WPARAM)DataManager.
Position
);
3294
_selectedIndex = DataManager.
Position
;
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (8)
718
CurrencyManager!.
Position
> -1 && // condition 3.
719
CurrencyManager.
Position
== _owner.NewRowIndex && // condition 4.
1227
int rowIndex = CurrencyManager!.
Position
;
1291
if (CurrencyManager!.
Position
>= 0 && CurrencyManager.
Position
< CurrencyManager.List!.Count)
1304
if (CurrencyManager.
Position
>= 0 && CurrencyManager.
Position
< CurrencyManager.List!.Count)
1358
&& CurrencyManager.
Position
!= e.RowIndex)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
14782
Debug.Assert(DataConnection.CurrencyManager.
Position
== _ptCurrentCell.Y);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (4)
1894
if (DataManager is not null && DataManager.
Position
!= SelectedIndex)
1939
SelectedIndex = DataManager.
Position
;
2012
SelectedIndex = DataManager.
Position
;
2118
PInvokeCore.SendMessage(this, PInvoke.LB_SETCURSEL, (WPARAM)DataManager.
Position
);
System\Windows\Forms\Controls\ListControl\ListControl.cs (2)
399
SelectedIndex = _dataManager.
Position
;
414
SelectedIndex = _dataManager.
Position
;
System\Windows\Forms\DataBinding\Binding.BindToObject.cs (1)
185
cm[cm.
Position
] = value;
System\Windows\Forms\DataBinding\BindingSource.cs (2)
361
get => _currencyManager.
Position
;
364
if (_currencyManager.
Position
!= value)
System\Windows\Forms\DataBinding\CurrencyManager.cs (21)
132
public override object? Current => this[
Position
];
288
validating: (
Position
!= _list.Count - 1),
289
endCurrentEdit: (
Position
!= _list.Count - 1),
301
object? item = (
Position
>= 0 &&
Position
< _list.Count) ? _list[
Position
] : null;
310
iListWithCancelAddNewSupport.CancelNew(
Position
);
313
OnItemChanged(new ItemChangedEventArgs(
Position
));
314
if (
Position
!= -1)
316
OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged,
Position
));
474
object? item = (
Position
>= 0 &&
Position
< _list.Count) ? _list[
Position
] : null;
483
iListWithCancelAddNewSupport.EndNew(
Position
);
776
ChangeRecordState(dbe.NewIndex, true,
Position
> -1 &&
Position
< _list.Count, true, false);
782
ChangeRecordState(dbe.OldIndex, true,
Position
> -1 &&
Position
< _list.Count, true, false);
845
object? item = _list[
Position
];
891
if ((e.Index == listposition || (e.Index == -1 &&
Position
< Count)) && !_state.HasFlag(CurrencyManagerStates.InChangeRecordState))
1022
ChangeRecordState(newPos, _state.HasFlag(CurrencyManagerStates.Bound), (
Position
!= newPos), true, false);
System\Windows\Forms\DataBinding\ListBindingHelper.cs (2)
57
bool currentKnown = (cm is not null && cm.
Position
>= 0 && cm.
Position
<= cm.Count - 1);
System.Windows.Forms.Tests (31)
System\Windows\Forms\BindingContextTests.cs (10)
423
Assert.Equal(0, manager.
Position
);
437
Assert.Equal(0, manager.
Position
);
456
Assert.Equal(0, manager.
Position
);
583
Assert.Equal(0, manager.
Position
);
620
Assert.Equal(0, manager.
Position
);
642
Assert.Equal(0, manager.
Position
);
827
Assert.Equal(0, manager.
Position
);
865
Assert.Equal(0, manager.
Position
);
922
Assert.Equal(0, manager1.
Position
);
929
Assert.Equal(0, manager2.
Position
);
System\Windows\Forms\BindingSourceTests.cs (7)
28
Assert.Equal(-1, source.CurrencyManager.
Position
);
87
Assert.Equal(-1, source.CurrencyManager.
Position
);
152
Assert.Equal(-1, source.CurrencyManager.
Position
);
238
Assert.Equal(0, source.CurrencyManager.
Position
);
308
Assert.Equal(0, source.CurrencyManager.
Position
);
417
Assert.Equal(-1, source.CurrencyManager.
Position
);
491
Assert.Equal(-1, source.CurrencyManager.
Position
);
System\Windows\Forms\ListBoxTests.cs (11)
2458
Assert.Equal(1, control.DataManager.
Position
);
2467
Assert.Equal(1, control.DataManager.
Position
);
2476
Assert.Equal(0, control.DataManager.
Position
);
2485
Assert.Equal(0, control.DataManager.
Position
);
2940
Assert.Equal(1, control.DataManager.
Position
);
2949
Assert.Equal(1, control.DataManager.
Position
);
2958
Assert.Equal(1, control.DataManager.
Position
);
2967
Assert.Equal(0, control.DataManager.
Position
);
2976
Assert.Equal(0, control.DataManager.
Position
);
5848
Assert.Equal(position, control.DataManager.
Position
);
5855
Assert.Equal(position, control.DataManager.
Position
);
System\Windows\Forms\ListControlTests.cs (3)
389
Assert.Equal(0, control.DataManager.
Position
);
465
Assert.Equal(0, control.DataManager.
Position
);
508
Assert.Equal(0, control.DataManager.
Position
);