| | |
| | | using CommonModel; |
| | | using System; |
| | | using System; |
| | | using System.ComponentModel; |
| | | using System.Runtime.CompilerServices; |
| | | using System.Windows; |
| | | using System.Windows.Controls; |
| | | using System.Windows.Controls.Primitives; |
| | | using System.Windows.Documents; |
| | | using System.Windows.Input; |
| | | using System.Windows.Media; |
| | | using System.Windows.Shapes; |
| | | using WPFProject.Models; |
| | | using WPFProject.UI.Test; |
| | | using WPFProject.Utils; |
| | | using static WPFProject.Utils.Resize.Resizeable; |
| | | |
| | | namespace WPFProject.Controls |
| | | { |
| | |
| | | |
| | | public DragType DragType { get; set; } = DragType.Canvas; |
| | | |
| | | private int _Zindex; |
| | | |
| | | public int Zindex |
| | | { |
| | | get { return _Zindex; } |
| | | set => RaiseAndSetIfChanged(ref _Zindex, value); |
| | | get { |
| | | return Canvas.GetZIndex(this); |
| | | } |
| | | set |
| | | { |
| | | Canvas.SetZIndex(this, value); |
| | | } |
| | | } |
| | | |
| | | public AdornerDecorator ResizeAdornerDecorator { get => VisualTreeHelper.GetChild(this, 0) as AdornerDecorator; } |
| | | |
| | | |
| | | public event EventHandler MinEvent; |
| | |
| | | private void InnerWindow_SizeChanged(object sender, SizeChangedEventArgs e) |
| | | { |
| | | //throw new NotImplementedException(); |
| | | } |
| | | |
| | | private void InitThumb() |
| | | { |
| | | |
| | | } |
| | | |
| | | // 方形工厂 |
| | | FrameworkElementFactory GetFactory(Brush back) |
| | | { |
| | | FrameworkElementFactory fac = new FrameworkElementFactory(typeof(Rectangle)); |
| | | fac.SetValue(Rectangle.FillProperty, back); |
| | | return fac; |
| | | } |
| | | |
| | | private void InnerWindow_Loaded(object sender, RoutedEventArgs e) |
| | |
| | | { |
| | | if (true) |
| | | { |
| | | Resize.SetIsResizeable(this, true); |
| | | Resize.SetIsResizeable(this, true); |
| | | } |
| | | canvas.Children.Add(this); |
| | | this.canvas = canvas; |
| | |
| | | |
| | | private void Grid_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) |
| | | { |
| | | |
| | | } |
| | | this.Focus(); |
| | | }
|
| | |
|
| | | private void UserControl_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
| | | {
|
| | |
|
| | | }
|
| | | } |
| | | |
| | | public class InnerWindowProp : NotifyBase |