StaticClass.cs_1121

本文详细介绍了如何在计算机应用中实现拖放控件的功能,包括定义类、属性和方法来处理面板、列表框和控件之间的拖动与放置操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;

namespace ComputerDropDragControl
{
    public static class StaticClass
    {
        private static PanelDragDropTarget dragPanel;
        public static PanelDragDropTarget DragPanel
        {
            get
            {
                return dragPanel;
            }
            set
            {
                dragPanel = value;
                //MessageBox.Show("helloSet!");
            }
        }

        private static ListBoxDragDropTarget dragPanelList;
        public static ListBoxDragDropTarget DragPanelList
        {
            get
            {
                return dragPanelList;
            }
            set
            {
                dragPanelList = value;
            }
        }

        private static ListBoxDragDropTarget drogPanelList;
        public static ListBoxDragDropTarget DrogPanelList
        {
            get
            {
                return drogPanelList;
            }
            set
            {
                drogPanelList = value;
            }
        }

        private static PanelDragDropTarget dropPanel;
        public static PanelDragDropTarget DropPanel
        {
            get
            {
                return dropPanel;
            }
            set
            {
                dropPanel = value;
                //MessageBox.Show("dropPanel!");
            }
        }

        private static bool fromList;
        public static bool FromList
        {
            get
            {
                return fromList;
            }
            set
            {
                fromList = value;
            }
        }

        private static bool existPlace;
        public static bool ExistPlace
        {
            get
            {
                return existPlace;
            }
            set
            {
                existPlace = value;
            }
        }

        public static bool DropInHandCar { get; set; }
        public static bool DropInRecyle { get; set; }
        public static bool FromHandCar { get; set; }

        public static ComputerUnit CUStatic { get; set; }
        public static UIElement ProgressBarStatic { get; set; }
        public static UIElement UIRoot { get; set; }
        public static Storyboard UISB { get; set; }

        public static UIElement MainPageAccordion { get; set; }
        public static UIElement EquipmentTreeViewScroll { get; set; }
        public static UIElement SearchPanelScroll { get; set; }
        public static UIElement HandCarScroll { get; set; }

        //private static List<ListBoxItem> handCarList = new List<ListBoxItem>();
        //public static List<ListBoxItem> HandCarList
        //{
        //    get
        //    {
        //        return handCarList;
        //    }
        //    set
        //    {
        //        handCarList = value;
        //    }
        //}
    }
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值