• C#实现可自定义图片的checkBox


    不多说,直接上源码。将这些代码放到一个文件里,加入工程,就可以像其它控件一样使用了。

        public partial class CheckButton : Button
        {
            Image checkImage;
            [Description("Image when checked"),Category("Special property")]
            public Image CheckedImage
            {
                get { return checkImage; }
                set { checkImage = value; }
            }
            Image unCheckImage;
            [Description("Image when unchecked"), Category("Special property")]
            public Image UncheckedImage
            {
                get { return unCheckImage; }
                set { unCheckImage = value; }
            }

            bool checkedState;
            [Description("Checked state"), Category("Special property")]
            public bool CheckState
            {
                get { return checkedState; }
                set { checkedState = value; }
            }
            public CheckButton()
            {
                InitializeComponent();
            }
        }

  • 相关阅读:
    解决ScrollView嵌到listView冲突问题
    Popupwindow 的简单实用,(显示在控件下方)
    BroadCast,BroadCastReceiver
    NSURLSession
    sirikit
    MJExtension使用
    iOS中的translucent和automaticallyAdjustsScrollViewInsets用法
    如何获取LanuchImage-1(详细)
    如何获取LanuchImage
    MJRefresh详解
  • 原文地址:https://www.cnblogs.com/ceblog/p/12751418.html
Copyright © 2020-2023  润新知