locked
Add Keydown event to MediaPlayer

    Question

  • <MediaPlayer x:Name="Video" Height="480" Width="854" Volume="0.5" KeyDown="OnKeyDown"/>

    void BlankPage::OnKeyDown(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyEventArgs ^ e)
    {
    if (e->Key == VirtualKey::Escape && Video->Width == 1366)
    {
    Video->Width = 854;
    Video->Height = 480;
    }
    }

    when i press down 'ESC' key, the app crashed, why?

    Unhandled exception at 0x00B0BA99 in MetroPlayer.exe: 0xC00000FD: Stack overflow (parameters: 0x00000001, 0x02E02FB8).


    haha

    Thursday, May 24, 2012 8:57 AM

All replies

  •  

    Hello,

     

    I cannot reproduce your issue on my side, would you please upload a whole project to skydriver, or show us the detail steps to reproduce this issue.

     

    It is not necessary that you send out the whole of your project. We just need a simplest sample to reproduce the problem. You can remove any confidential information or business details from it.

     

    Best regards,

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Friday, May 25, 2012 6:12 AM
  • I have upload the project to my skydriver/public, please check, thanks!

    haha

    Thursday, May 31, 2012 6:24 AM