본문 바로가기
→ 개발/WPF

[WPF] DispatcherTimer 타이머

by 벅스쭌 2010. 11. 17.
반응형
DispatcherTimer timer;

//함수1 내부
            timer = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(10);
            timer.Tick += new EventHandler(timer_Tick);
            timer.Start();
//함수1 내부 끝

        void timer_Tick(object sender, EventArgs e)
        {
            sbTest = (Storyboard)(wc.FindResource("SbBasicBgDown"));
            sbTest.Begin();
            timer.Stop();
        }
반응형