פורסם 2021 בינואר 124 שנים מחבר זה קוד תקין? private void btn1_Click(object sender, RoutedEventArgs e) { timer.Tick += Timer_Tick_fade; } private void Timer_Tick_fade(object sender, EventArgs e) { var item = (tab1.Items[tab1.SelectedIndex] as TabItem).Content as Grid; item.Opacity -= 0.001; if (item.Opacity < 0.1) { tab1.SelectedIndex = tab1.SelectedIndex != tab1.Items.Count - 1 ? tab1.SelectedIndex+1 : 0; timer.Tick -= Timer_Tick_fade; item.Opacity = 1.0; } } private void btn_slide_Click(object sender, RoutedEventArgs e) { timer.Tick += Timer_Tick_slide; } private void Timer_Tick_slide(object sender, EventArgs e) { var item = (tab1.Items[tab1.SelectedIndex] as TabItem).Content as Grid; item.Margin = new Thickness(item.Margin.Left+1,0,0,0); if (item.Margin.Left >= 1000) { tab1.SelectedIndex = tab1.SelectedIndex != tab1.Items.Count - 1 ? tab1.SelectedIndex + 1 : 0; timer.Tick -= Timer_Tick_slide; item.Margin = new Thickness(0,0,0,0); } } הוא עושה את העבודה די יפה, ולדעתי הקוד יותר יפה ממה שהפנת אותי אליו. נערך 2021 בינואר 124 שנים על-ידי eido300
פורסם 2021 בינואר 124 שנים מחבר בslideיש טעות, יותר מאוחר אשנה את זה. טעות, הslide מצויין. האם זו הדרך הנכונה לעשות את זה? אגב למה זה לא עובד עם theard.sleep וtask.delay.wait? נערך 2021 בינואר 124 שנים על-ידי eido300
ארכיון
דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.