public CommandBarHostItem(Control hostedControl)
        {
            RadHostItem item = new RadHostItem(hostedControl);

            this.HostedItem    = item;
            this.hostedControl = hostedControl;
        }
示例#2
0
        public CSTreeViewComboBoxEx()
        {
            this.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
            this.IntegralHeight   = true;
            this.Virtualized      = false;

            //initialize combobox height
            for (int i = 0; i < 15; i++)
            {
                this.Items.Add(new RadComboBoxItem());
            }

            _treeView                     = new CSTreeView();
            _treeView.CheckBoxes          = true;
            _treeView.PathSeparator       = TreeNodePathSeparator;
            _treeView.NodeCheckedChanged += new RadTreeView.TreeViewEventHandler(_treeView_NodeCheckedChanged);
            _treeView.MouseUp            += new System.Windows.Forms.MouseEventHandler(_treeView_MouseUp);
            _treeView.Height              = 600;

            _h = new RadHostItem(_treeView);
            this.DropDownMinSize = new Size(this.Width, 600);
            this.DropDownStyle   = RadDropDownStyle.DropDownList;

            this.ToolTipTextNeeded += new ToolTipTextNeededEventHandler(CSTreeViewComboBox_ToolTipTextNeeded);
        }
示例#3
0
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.calendar = new RadCalendar();
     this.calendar.AllowMultipleSelect = true;
     this.hostItem = new RadHostItem((Control)this.calendar);
     this.Children.Add((RadElement)this.hostItem);
 }
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.listControl = new RadListControl();
     this.listControl.SelectionMode = SelectionMode.MultiSimple;
     this.hostItem = new RadHostItem((Control)this.listControl);
     this.Children.Add((RadElement)this.hostItem);
 }
示例#5
0
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.editor      = new PlusMinusEditor();
     this.editor.Size = new Size(100, 21);
     this.hostItem    = new RadHostItem((Control)this.editor);
     this.hostItem.StretchHorizontally = false;
     this.hostItem.StretchVertically   = false;
     this.hostItem.Alignment           = ContentAlignment.MiddleCenter;
     this.Children.Add((RadElement)this.hostItem);
 }
示例#6
0
        protected override RadElement CreateEditorElement()
        {
            this.inkEdit1             = new InkEdit();
            this.inkEdit1.RecoTimeout = 1000;


            this.inkEdit1.UseMouseForInput = true;

            var host = new RadHostItem(inkEdit1);

            host.BackColor = System.Drawing.Color.White;
            return(host);
        }
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            this.cellElement = new GridCellElement(null, this);
            this.cellElement.StretchHorizontally = true;
            this.cellElement.StretchVertically   = true;
            this.Children.Add(cellElement);

            this.hostedControl = new AdvanceFilterControl();
            RadHostItem hostItem = new RadHostItem(this.hostedControl);

            this.cellElement.Children.Add(hostItem);
        }
示例#8
0
        protected override void CreateChildElements()
        {
            this.contentPanel         = new RadTabStripContentPanel();
            this.contentPanel.Visible = false;
            this.contentPanel.SetAssociatedItem(this);
            this.contentPanelHost = new RadHostItem(contentPanel);
            this.contentPanelHost.SetDefaultValueOverride(RadElement.AutoSizeModeProperty, RadAutoSizeMode.FitToAvailableSize);

            // When the docking is being shown for the first time an exception in TabItem was thrown.
            this.textPrimitive = new TextPrimitive();
            this.image         = new ImagePrimitive();

            this.fill       = new FillPrimitive();
            this.fill.Class = "TabFill";
            this.Children.Add(this.fill);

            this.tabBorder              = new BorderPrimitive();
            this.tabBorder.Class        = "TabItemBorder";
            this.tabBorder.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;
            this.Children.Add(this.tabBorder);

            this.layout = new ImageAndTextLayoutPanel();
            this.layout.UseNewLayoutSystem  = this.UseNewLayoutSystem;
            this.layout.StretchHorizontally = true;
            this.layout.StretchVertically   = true;

            this.layout.BindProperty(ImageAndTextLayoutPanel.DisplayStyleProperty, this, TabItem.DisplayStyleProperty, PropertyBindingOptions.OneWay);
            this.layout.BindProperty(ImageAndTextLayoutPanel.ImageAlignmentProperty, this, TabItem.ImageAlignmentProperty, PropertyBindingOptions.OneWay);
            this.layout.BindProperty(ImageAndTextLayoutPanel.TextAlignmentProperty, this, TabItem.TextAlignmentProperty, PropertyBindingOptions.OneWay);
            this.layout.BindProperty(ImageAndTextLayoutPanel.TextImageRelationProperty, this, TabItem.TextImageRelationProperty, PropertyBindingOptions.OneWay);

            this.Children.Add(this.layout);

            this.textPrimitive.SetValue(ImageAndTextLayoutPanel.IsTextPrimitiveProperty, true);
            this.textPrimitive.BindProperty(TextPrimitive.TextProperty, this, RadItem.TextProperty, PropertyBindingOptions.OneWay);
            this.textPrimitive.Class    = "TabItemText";
            this.textPrimitive.AutoSize = true;
            this.layout.Children.Add(this.textPrimitive);

            this.image.Class = "TabItemImage";
            this.image.SetValue(ImageAndTextLayoutPanel.IsImagePrimitiveProperty, true);

            this.image.BindProperty(ImagePrimitive.ImageIndexProperty, this, RadButtonItem.ImageIndexProperty, PropertyBindingOptions.TwoWay);
            this.image.BindProperty(ImagePrimitive.ImageProperty, this, RadButtonItem.ImageProperty, PropertyBindingOptions.TwoWay);
            this.image.BindProperty(ImagePrimitive.ImageKeyProperty, this, RadButtonItem.ImageKeyProperty, PropertyBindingOptions.TwoWay);

            this.layout.Children.Add(image);
        }
示例#9
0
        public OutLookStyleLayout(RadPanelBarVisualElement captionElement, RadPanelBarOverFlow panelBarOverFlow, OutLookGripPrimitive grip, RadHostItem host)
        {
            this.captionElement   = captionElement;
            this.panelBarOverFlow = panelBarOverFlow;
            this.grip             = grip;
            this.host             = host;

            this.Children.Add(this.captionElement);
            this.captionElement.StretchHorizontally = true;
            this.Children.Add(this.panelBarOverFlow);
            this.Children.Add(this.grip);

            if (this.host != null)
            {
                this.Children.Add(this.host);
            }
        }
示例#10
0
        private void radCalendar1_ElementRender(object sender, RenderElementEventArgs e)
        {
            //if (e.Day.Date == DateTime.Now.Date)
            //{

            ////}
            if (e.Day.TemplateItem == null)
            {
                RadTextBox txt = new RadTextBox();
                txt.Text = "<html>"
                           + "test" + "<br /><p>Aha</p>" +
                           "</html>";
                RadHostItem hostItem = new RadHostItem(txt);
                //e.Day.TemplateItem.cl
                //e.Day.TemplateItem = hostItem;
                //e.Element.Text = "<html>"
                //               + e.Day.Date.Day.ToString() + "<br /><p>Aha</p>" +
                //               "</html>";
            }
        }
示例#11
0
        public OutlookStyle(RadPanelBarElement panelBar, RadTabStripContentPanel contentPanel, RadPanelBarContentControl itemsControl) : base(panelBar)
        {
            //this.panelBar = panelBar;
            this.contentPanel = contentPanel;
            this.itemsControl = itemsControl;

            if (itemsControl == null)
            {
                this.itemsControl = new RadPanelBarContentControl();
            }

            if (this.contentPanel != null)
            {
                this.contentPanelHost      = new RadHostItem(this.contentPanel);
                this.contentPanel.AutoSize = false;
//                this.contentPanel.AutoScroll = false;
////				this.contentPanelHost.AutoSize = false;
//                this.contentPanel.Size = new Size(50, 50);
//                this.contentPanelHost.Size = new Size(50, 50);
                this.contentPanel.Visible                 = false;
                this.contentPanelHost.Visibility          = ElementVisibility.Hidden;
                this.contentPanelHost.StretchHorizontally = true;
                this.contentPanelHost.StretchVertically   = true;
                this.contentPanel.Location                = this.contentPanelHost.LocationToControl();
            }
            else
            {
                this.contentPanelHost            = new RadHostItem(this.itemsControl);
                this.contentPanelHost.AutoSize   = false;
                this.contentPanelHost.Size       = new Size(50, 50);
                this.contentPanelHost.Visibility = ElementVisibility.Hidden;
                this.itemsControl.MaximumSize    = new Size(this.contentPanelHost.Bounds.Width, this.contentPanelHost.Size.Height);
                //    this.itemsControl.Bounds = new Rectangle(this.contentPanelHost.Bounds.X, 0, this.contentPanelHost.Bounds.Width, this.contentPanelHost.Bounds.Height);
                this.itemsControl.Bounds = this.contentPanelHost.Bounds;
                this.contentPanelHost.StretchHorizontally = false;
                this.contentPanelHost.StretchVertically   = false;
            }

            this.collapsedGroups = new List <RadPanelBarGroupElement>();
        }
示例#12
0
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.treeView = new RadTreeView();
     this.treeView.TriStateMode          = true;
     this.treeView.CheckBoxes            = true;
     this.treeView.ShowExpandCollapse    = false;
     this.treeView.ShowLines             = true;
     this.treeView.ShowRootLines         = false;
     this.treeView.NodeCheckedChanged   += new TreeNodeCheckedEventHandler(this.treeView_NodeCheckedChanged);
     this.treeView.NodeExpandedChanging += new RadTreeView.RadTreeViewCancelEventHandler(this.treeView_NodeExpandedChanging);
     this.treeView.NodeMouseClick       += new RadTreeView.TreeViewEventHandler(this.treeView_NodeMouseClick);
     this.nullNode    = new RadTreeNode();
     this.nonNullNode = new RadTreeNode();
     this.treeView.Nodes.Add(this.nullNode);
     this.treeView.Nodes.Add(this.nonNullNode);
     this.allNode          = new RadTreeNode();
     this.allNode.Expanded = true;
     this.treeView.Nodes.Add(this.allNode);
     this.hostItem = new RadHostItem((Control)this.treeView);
     this.Children.Add((RadElement)this.hostItem);
 }
示例#13
0
        protected override RadElement CreateEditorElement()
        {
            var hostItem = new RadHostItem(control);

            return(hostItem);
        }