コード例 #1
0
        public void AddSnap(SnapWindow window, Dock dock)
        {
            StackPanel panel;

            switch (dock)
            {
            default:
                throw new ArgumentException();

            case Dock.Top:
                panel = SP_Top;
                break;

            case Dock.Left:
                panel = SP_Left;
                break;

            case Dock.Bottom:
                panel = SP_Bottom;
                break;

            case Dock.Right:
                panel = SP_Right;
                break;
            }

            SnapLabel label = new SnapLabel();

            label.Tag = new TAG_Label {
                window = window
            };
            Binding b = new Binding("Title");

            b.Source = window.Window;
            label.SetBinding(SnapLabel.TextProperty, b);
            label.MouseLeftButtonDown += SnapLabel_MouseLeftButtonDown;
            label.DockedAt             = dock;
            label.btnCloseLabel.Click += BtnCloseLabel_Click;
            window.HeaderVisible       = dock != Dock.Top;
            panel.Children.Add(label);
            window.Window.LoadSnap();
            SnapLabel_MouseLeftButtonDown(label, default(MouseButtonEventArgs));
        }
コード例 #2
0
 public OnSnapFocusChangeEventArgs(SnapWindow SnapWindowNew, SnapWindow SnapWindowLast, Dock Dock)
 {
     this.SnapWindowNew  = SnapWindowNew;
     this.SnapWindowLast = SnapWindowLast;
     this.Dock           = Dock;
 }