using System;
using System.Windows;
using System.Windows.Input;
namespace wpftest
{
/// <summary>
/// Description of Class1.
/// </summary>
public class Class1
{
public Class1()
{
}
[STAThread]
public static void Main()
{
Window win=new Window();
win.Title="hello wpf";
win.Show();
win.MouseDown+= new MouseButtonEventHandler(onwinmousedonw);
Application app=new Application();
app.Run(win);
}
static void onwinmousedonw(object sender,MouseButtonEventArgs args)
{
Window bb=sender as Window;
string template="windows mouse {0} click at point{1} ";
string msg=string.Format(template,args.ChangedButton,args.GetPosition(bb));
MessageBox.Show(msg,bb.Title);
}
}
}
using System.Windows;
using System.Windows.Input;
namespace wpftest
{
/// <summary>
/// Description of Class1.
/// </summary>
public class Class1
{
public Class1()
{
}
[STAThread]
public static void Main()
{
Window win=new Window();
win.Title="hello wpf";
win.Show();
win.MouseDown+= new MouseButtonEventHandler(onwinmousedonw);
Application app=new Application();
app.Run(win);
}
static void onwinmousedonw(object sender,MouseButtonEventArgs args)
{
Window bb=sender as Window;
string template="windows mouse {0} click at point{1} ";
string msg=string.Format(template,args.ChangedButton,args.GetPosition(bb));
MessageBox.Show(msg,bb.Title);
}
}
}