using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Security.Ausing System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Tango.Visuals
{
/// <summary>
/// Interaction logic for MetroWindowControl.xaml
/// </summary>
//[ContentProperty("RealContent")]
public partial class MetroWindowControl : ContentControl
{
private Window _window;
private bool _preventNextWindowMove;
private Grid PART_MainGrid;
private Thumb PART_ThumbMove;
private Button PART_ButtonClose;
private Button PART_ButtonMaximize;
private Button PART_ButtonMinimize;
private Thumb PART_ThumbResizeRight;
private Thumb PART_ThumbResizeBottom;
private Thumb PART_ThumbResizeBottomRight1;
private Thumb PART_ThumbResizeBottomRight2;
static MetroWindowControl()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(MetroWindowControl), new FrameworkPropertyMetadata(typeof(MetroWindowControl)));
}
public bool ShowCloseButton
{
get { return (bool)GetValue(ShowCloseButtonProperty); }
set { SetValue(ShowCloseButtonProperty, value); }
}
public static readonly DependencyProperty ShowCloseButtonProperty =
DependencyProperty.Register("ShowCloseButton", typeof(bool), typeof(MetroWindowControl), new PropertyMetadata(true));
public bool ShowMaximizeButton
{
get { return (bool)GetValue(ShowMaximizeButtonProperty); }
set { SetValue(ShowMaximizeButtonProperty, value); }
}
public static readonly DependencyProperty ShowMaximizeButtonProperty =
DependencyProperty.Register("ShowMaximizeButton", typeof(bool), typeof(MetroWindowControl), new PropertyMetadata(true));
public bool ShowMinimizeButton
{
get { return (bool)GetValue(ShowMinimizeButtonProperty); }
set { SetValue(ShowMinimizeButtonProperty, value); }
}
public static readonly DependencyProperty ShowMinimizeButtonProperty =
DependencyProperty.Register("ShowMinimizeButton", typeof(bool), typeof(MetroWindowControl), new PropertyMetadata(true));
public Brush TitleBackground
{
get { return (Brush)GetValue(TitleBackgroundProperty); }
set { SetValue(TitleBackgroundProperty, value); }
}
public static readonly DependencyProperty TitleBackgroundProperty =
DependencyProperty.Register("TitleBackground", typeof<