0

在下面关于 Visual Studio express C# 的代码中,我收到一条错误消息,指出当前上下文中不存在名称“handled”。我究竟做错了什么?已处理的返回通知软件它不应继续执行通常在双击时会执行的操作。

public class SettingsComponentAttributes : ComponentAttributes
{
    public override ObjectResponse RespondToMouseDoubleClick(Canvas sender, CanvasMouseEvent e)
    {
        ((SettingsComponent)Owner).ShowSettingsGui();
        return handled;
    }
}
4

1 回答 1

0

以下是我解决问题的方法:

public class SettingsComponentAttributes : ComponentAttributes
{
    public override ObjectResponse RespondToMouseDoubleClick(Canvas sender, CanvasMouseEvent e)
    {
        ((SettingsComponent)Owner).ShowSettingsGui();
        return ObjectResponse.handled;
    }
}
于 2012-07-24T09:20:06.653 回答