zoukankan      html  css  js  c++  java
  • propertyGrid实现选项(原创)

    Draw Dorp-Down propertyGrid

    [TypeConverter(typeof(backgroundRepeatConverter)),
                DescriptionAttribute(
    "description"),
                CategoryAttribute(
    "行为")]
                
    public string backgroundRepeat
                
    {
                    
    get
                    
    {
                            
    if(e.style.backgroundRepeat==null)return "";
                            
    return e.style.backgroundRepeat;
                    
                    }

                    
    set
                    
    {
                        e.style.backgroundRepeat
    =value;
                    }

                }


    public class backgroundRepeatConverter: StringConverter
            
    {  
                
    public override StandardValuesCollection
                    GetStandardValues(ITypeDescriptorContext context) 
                
    {
                    
    return new StandardValuesCollection(new string[]{"repeat"
                                                                        
    "repeat-x"
                                                                        
    "repeat-y",
                    
    "no-repeat"}
    );
                }

                
    public override bool GetStandardValuesSupported(
                    ITypeDescriptorContext context) 
                
    {
                    
    return true;
                }

                
    public override bool GetStandardValuesExclusive(
                    ITypeDescriptorContext context) 
                
    {
                    
    return true;
                }

            }
     
  • 相关阅读:
    C++开发人脸性别识别教程(12)——加入性别识别功能
    Java数组实现循环队列的两种方法
    开源 免费 java CMS
    Android必知必会-Stetho调试工具
    初中级DBA必需要学会的9个Linux网络命令,看看你有哪些还没用过
    fputs与fgets
    一个使用命令行编译Android项目的工具类
    SpringMVC @RequestBody接收Json对象字符串 demo
    spring 事件(Application Event)
    spring Aop的一个demo
  • 原文地址:https://www.cnblogs.com/alice/p/189034.html
Copyright © 2011-2022 走看看