本文介绍了910211-未触发onmousedown的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨我的应用程序是Silverlight类型.我想在用户单击浏览器的边框时触发.为此,我使用了以下方法:

  public  MainPage()
{
    InitializeComponent();
     bool  bResult = System.Windows.Browser.HtmlPage.Window.AttachEvent("  onmousedown"  EventHandler( this  .eventHandler));
}

私有 无效 eventHandler(对象发​​件人,EventArgs e)
{
    ...
} 


但未调用eventHandler.为什么?
ps1.如果我将"onmousedown"更改为"onresize",则称为.
ps2. bResult在两种情况下都是正确的.

解决方案


himy application is of type Silverlight. i want to trigger when user clicks on the border of the browser. for this purpose, i used this method:

public MainPage()
{
    InitializeComponent();
    bool bResult = System.Windows.Browser.HtmlPage.Window.AttachEvent("onmousedown", new EventHandler(this.eventHandler));
}

private void eventHandler(object sender, EventArgs e)
{
    ...
}


but the eventHandler is not called. why?
ps1. if i change "onmousedown" to "onresize" it''s called.
ps2. bResult is true in both cases.

解决方案


这篇关于910211-未触发onmousedown的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 11:20