开发者

Disabling Double Click to make Silverlight Video Player full screen

Hey guys, I am trying to figure out how to disable the ability for a user to double click th开发者_运维知识库e silverlight player and make it fullscreen. I am working off of Silverlight Video Player 2. I have commented out every single line referencing the words fullscreen but it still lets the user double click the player and make it fullscreen. Does anyone have any idea how to achieve this?


Sorry, I seemed to have figured it out. For some reason my find didn't pick this up. In the Page.Xaml.CS there is a method

void LayoutRoot_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
    {
        // The the last click was within 500ms...
        if ((DateTime.Now - _lastClick).TotalMilliseconds < 500)
        {
            // Toggle fullscreen
            //Application.Current.Host.Content.IsFullScreen = !Application.Current.Host.Content.IsFullScreen;

            _lastClick = DateTime.Now.AddSeconds(-1);
        }
        else
        {

            // Store the last click time
            _lastClick = DateTime.Now;
        }
    }

I just commented out the line : "Application.Current.Host.Content.IsFullScreen = !Application.Current.Host.Content.IsFullScreen;" and it worked. Hope this helps anyone else with the same issue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜