private async void MediaPlayer_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { FrameworkElement ctrl = (FrameworkElement)sender; ClickAttach.SetClicks(ctrl, e.ClickCount); await Task.Delay(300); DoClickStuff(ctrl); }
private void DoClickStuff(FrameworkElement ctrl) { int clicks = ClickAttach.GetClicks(ctrl); ClickAttach.SetClicks(ctrl, 0); if (clicks > 0) { if (clicks == 1) { PlayClick(); } else { FullscreenClick(); } } }