DataRepeaterItem.IsCurrent 속성
결정 하는 값을 가져옵니다 여부를 DataRepeaterItem 현재 선택한 항목으로는 DataRepeater 컨트롤입니다.
네임스페이스: Microsoft.VisualBasic.PowerPacks
어셈블리: Microsoft.VisualBasic.PowerPacks.Vs(Microsoft.VisualBasic.PowerPacks.Vs.dll)
구문
‘선언
<BrowsableAttribute(False)> _
Public ReadOnly Property IsCurrent As Boolean
[BrowsableAttribute(false)]
public bool IsCurrent { get; }
[BrowsableAttribute(false)]
public:
property bool IsCurrent {
bool get ();
}
[<BrowsableAttribute(false)>]
member IsCurrent : bool
function get IsCurrent () : boolean
속성 값
형식: System.Boolean
true 경우는 DataRepeaterItem 는 현재 선택된 된 항목입니다. 그렇지 않으면 false.
설명
때 IsCurrent 인 True의 ItemIndex 속성을는 DataRepeaterItem 같은 CurrentItemIndex 속성의는 DataRepeater 컨트롤.
예제
다음 예제에서는 DrawItem 항목을 선택할 때 선택 영역 표시기가 표시 하는 이벤트 처리기입니다.포함 하는 폼 있다고 가정 DataRepeater 라는 DataRepeater1 도 언바운드 들어 있습니다 PictureBox 이라는 컨트롤을 SelectedPictureBox.
Private Sub DataRepeater1_DrawItem(
ByVal sender As Object,
ByVal e As Microsoft.VisualBasic.PowerPacks.DataRepeaterItemEventArgs
) Handles DataRepeater1.DrawItem
' If this is the selected item.
If e.DataRepeaterItem.IsCurrent Then
' ...display the PictureBox.
e.DataRepeaterItem.Controls("SelectedPictureBox").
Visible = True
Else
' Otherwise, hide the PictureBox.
e.DataRepeaterItem.Controls("SelectedPictureBox").
Visible = False
End If
End Sub
private void dataRepeater1_DrawItem(object sender,
Microsoft.VisualBasic.PowerPacks.DataRepeaterItemEventArgs e)
{
// If this is the selected item...
if (e.DataRepeaterItem.IsCurrent)
// ...display the PictureBox.
{
e.DataRepeaterItem.Controls["selectedPictureBox"].Visible = true;
}
else
{
// Otherwise, hide the PictureBox.
e.DataRepeaterItem.Controls["selectedPictureBox"].Visible = false;
}
}
.NET Framework 보안
- 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.
참고 항목
참조
Microsoft.VisualBasic.PowerPacks 네임스페이스