|
using System;
using System.ComponentModel.Composition;
using System.Runtime.InteropServices;
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Media;
using MefBasic;
namespace MediaAssistant.Controls.About
{
/// <summary>
/// Interaction logic for AboutWindow.xaml
/// </summary>
[Export]
[PartCreationPolicy(CreationPolicy.NonShared)]
public partial class AboutWindow:IView
{
public AboutWindow()
{
InitializeComponent();
}
public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HT_CAPTION = 0x2;
[DllImport("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, int Msg,
int wParam, int lParam);
[DllImport("user32.dll")]
public static extern bool ReleaseCapture();
public void move_window(object sender, MouseButtonEventArgs e)
{
ReleaseCapture();
SendMessage(new WindowInteropHelper(this).Handle,
WM_NCLBUTTONDOWN, HT_CAPTION, 0);
}
private void EXIT(object sender, MouseButtonEventArgs e)
{
Close();
}
private void Activate_Title_Icons(object sender, MouseEventArgs e)
{
Close_btn.Fill = (ImageBrush)Resources["Close_act"];
}
private void Deactivate_Title_Icons(object sender, MouseEventArgs e)
{
Close_btn.Fill = (ImageBrush)Resources["Close_inact"];
}
private void Close_pressing(object sender, MouseButtonEventArgs e)
{
Close_btn.Fill = (ImageBrush)Resources["Close_pr"];
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.