TabItem
의 컨트롤을 어떻게 반복 할 수 있습니까?tabitem의 루프를 통한 루프
어쨌든 TabItem
의 컨트롤 컬렉션을 찾을 수 없습니다.
무엇이 누락 되었습니까? MSDN에서
TabItem
의 컨트롤을 어떻게 반복 할 수 있습니까?tabitem의 루프를 통한 루프
어쨌든 TabItem
의 컨트롤 컬렉션을 찾을 수 없습니다.
무엇이 누락 되었습니까? MSDN에서
예 :
// Enumerate all the descendants of the visual object.
static public void EnumVisual(Visual myVisual)
{
for (int i = 0; i < VisualTreeHelper.GetChildrenCount(myVisual); i++)
{
// Retrieve child visual at specified index value.
Visual childVisual = (Visual)VisualTreeHelper.GetChild(myVisual, i);
// Do processing of the child visual object.
// Enumerate children of the child visual object.
EnumVisual(childVisual);
}
}
TabItem의 재산 내용에서 하나의 컨트롤이 포함되어 있습니다.
당신을 TabControl의 TabItem의 루프 의미하는 경우 :
public MainWindow()
{
InitializeComponent();
DispatcherTimer timer = new DispatcherTimer(DispatcherPriority.Background, Dispatcher);
timer.Interval = TimeSpan.FromSeconds(1);
timer.Tick += new EventHandler(timer_Tick);
timer.Start();
}
private int _selectedItem = 0;
void timer_Tick(object sender, EventArgs e)
{
tabControl.SelectedItem = tabControl.Items[_selectedItem];
_selectedItem = (_selectedItem + 1) % tabControl.Items.Count;
}
을