Inheritance: LayoutFarm.CustomWidgets.EaseBox, IDesignBox
Esempio n. 1
0
        static UIElement CloneImageBox(DesignBox dzBox)
        {
            UIHolderBox holderBox      = dzBox as UIHolderBox;
            var         originalImgBox = holderBox.TargetBox as LayoutFarm.CustomWidgets.ImageBox;
            var         newClone       = new UIHolderBox(holderBox.Width, holderBox.Height);

            newClone.BackColor = Color.White;
            var imgbox = new LayoutFarm.CustomWidgets.ImageBox(newClone.Width - 10, newClone.Height - 10);

            imgbox.ImageBinder = originalImgBox.ImageBinder;
            //clone content of text box

            newClone.SetCloneDelegate(CloneImageBox);
            newClone.SetSerializeDelegate(SerializeDzImageBox);
            newClone.AddChild(imgbox);
            newClone.TargetBox = imgbox;
            return(newClone);
        }
        static UIElement CloneTextBox(DesignBox dzBox)
        {
            UIHolderBox holderBox       = dzBox as UIHolderBox;
            var         originalTextBox = holderBox.TargetBox as LayoutFarm.CustomWidgets.TextBox;
            var         newClone        = new UIHolderBox(holderBox.Width, holderBox.Height);

            newClone.BackColor = Color.White;
            var textBox = new LayoutFarm.CustomWidgets.TextBox(newClone.Width - 10, newClone.Height - 10, true);

            textBox.BackgroundColor = Color.White;
            textBox.Text            = originalTextBox.Text;
            //clone content of text box

            newClone.SetCloneDelegate(CloneTextBox);
            newClone.SetSerializeDelegate(SerializeDzTextBox);
            newClone.AddChild(textBox);
            newClone.TargetBox = textBox;
            return(newClone);
        }
Esempio n. 3
0
        static UIElement CloneTextBox(DesignBox dzBox)
        {
            UIHolderBox holderBox = dzBox as UIHolderBox;
            var originalTextBox = holderBox.TargetBox as LayoutFarm.CustomWidgets.TextBox;
            var newClone = new UIHolderBox(holderBox.Width, holderBox.Height);
            newClone.BackColor = Color.White;
            var textBox = new LayoutFarm.CustomWidgets.TextBox(newClone.Width - 10, newClone.Height - 10, true);
            textBox.BackgroundColor = Color.White;
            textBox.Text = originalTextBox.Text;
            //clone content of text box 

            newClone.SetCloneDelegate(CloneTextBox);
            newClone.SetSerializeDelegate(SerializeDzTextBox);
            newClone.AddChild(textBox);
            newClone.TargetBox = textBox;
            return newClone;
        }
Esempio n. 4
0
        static UIElement CloneImageBox(DesignBox dzBox)
        {
            UIHolderBox holderBox = dzBox as UIHolderBox;
            var originalImgBox = holderBox.TargetBox as LayoutFarm.CustomWidgets.ImageBox;
            var newClone = new UIHolderBox(holderBox.Width, holderBox.Height);
            newClone.BackColor = Color.White;
            var imgbox = new LayoutFarm.CustomWidgets.ImageBox(newClone.Width - 10, newClone.Height - 10);
            imgbox.ImageBinder = originalImgBox.ImageBinder;
            //clone content of text box 

            newClone.SetCloneDelegate(CloneImageBox);
            newClone.SetSerializeDelegate(SerializeDzImageBox);
            newClone.AddChild(imgbox);
            newClone.TargetBox = imgbox;
            return newClone;
        }