开发者

Disabling Double Click to make Silverlight Video Player full screen

开发者 https://www.devze.com 2022-12-27 18:54 出处:网络
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

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

精彩评论

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

关注公众号