예제 #1
0
        public static ToolStripItemReference ToReference(this IToolStripItem item)
        {
            IBinding itemBinding = new Binding()
            {
                Source = item
            };

            if (item is FlexibleSpaceToolStripItem spaceRef)
            {
                return new ToolStripFlexibleSpaceReference()
                       {
                           [!ToolStripItemReference.TargetItemProperty] = itemBinding
                       }
            }
            ;
            else
            {
                return new ToolStripItemReference()
                       {
                           [!ToolStripItemReference.TargetItemProperty] = itemBinding
                       }
            };
        }
    }
예제 #2
0
 public void _setToolStripItem(IToolStripItem nToolStripItem)
 {
     mToolStripItem = nToolStripItem;
 }
예제 #3
0
 public ToolStripItemAdapt()
 {
     mToolStripItem = null;
     mContain = null;
     mType = null;
 }