Example #1
0
 /// <summary>
 ///     <span id="ctl00_ContentPlaceHolder1_src1_resRC_ctl01_LabelAbstract">Compares the
 /// current instance with another object of the same type.</span>
 /// </summary>
 public int CompareTo(RadListBoxItem item)
 {
     if (item == null)
     {
         return(1);
     }
     return(CultureInfo.InvariantCulture.CompareInfo.Compare(this.Text, item.Text, CompareOptions.None));
 }
Example #2
0
        private RadListBoxItem CreateSampleItem()
        {
            RadListBoxItem res = new RadListBoxItem("Item with description");

            res.DescriptionText         = "Description text which is longer..";
            res.TextSeparatorVisibility = ElementVisibility.Visible;
            return(res);
        }
Example #3
0
        private Size GetDesiredItemSize(RadElement item)
        {
            RadListBoxItem listBoxItem = item as RadListBoxItem;

            if (listBoxItem != null && !this.EqualChildrenHeight)
            {
                return(listBoxItem.GetDesiredSize());
            }
            return(item.FullSize);
        }
Example #4
0
        private void FillAssociatedTabs()
        {
            RadItem item;

            for (int i = 0; i < this.collection.Count; ++i)
            {
                item = this.collection[i];
                RadListBoxItem listItem = new RadListBoxItem(item.Text);
                listItem.Tag = item;
                this.radListBoxAssociatedTabs.Items.Add(listItem);
            }
        }
Example #5
0
        private RadListBoxItem BuildRadMenuContentItem(object tag, String name, String description, Image image, Size size, Font nameFont, Font descriptionFont, Telerik.WinControls.ElementVisibility separatorVisibility, bool selectable)
        {
            RadListBoxItem tmplContactListItem = new Telerik.WinControls.UI.RadListBoxItem();

            tmplContactListItem.AutoSize     = true;
            tmplContactListItem.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.Auto;
            tmplContactListItem.Size         = size;

            tmplContactListItem.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            tmplContactListItem.DisplayStyle      = Telerik.WinControls.DisplayStyle.ImageAndText;
            tmplContactListItem.Image             = image;
            tmplContactListItem.ImageAlignment    = ContentAlignment.MiddleCenter;
            //
            // tmplContactListItem
            //
            tmplContactListItem.AccessibleDescription = name;
            tmplContactListItem.CanFocus        = true;
            tmplContactListItem.Text            = " " + name.Trim();
            tmplContactListItem.DescriptionText = " " + description.Trim();

            tmplContactListItem.ForeColor = System.Drawing.Color.Black;

            tmplContactListItem.TextSeparatorVisibility = separatorVisibility;

            tmplContactListItem.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;

            tmplContactListItem.Font            = nameFont;
            tmplContactListItem.DescriptionFont = descriptionFont;
            tmplContactListItem.Tag             = tag;

            tmplContactListItem.ToolTipText = null;



            tmplContactListItem.Enabled = selectable;

            tmplContactListItem.DoubleClick += new EventHandler(tmplContactListItem_DoubleClick);

            return(tmplContactListItem);
        }
Example #6
0
        private void FillAvaibleTabs(RadRibbonBar parentRibbon)
        {
            RadPageViewItem item;

            this.ribbonBarTabs = new RadItemCollection();
            foreach (RadItem tabItem in parentRibbon.RibbonBarElement.TabStripElement.Items)
            {
                this.ribbonBarTabs.Add(tabItem);
            }

            for (int i = 0; i < ribbonBarTabs.Count; ++i)
            {
                item = (RadPageViewItem)ribbonBarTabs[i];

                if (this.ContextualGroupsNotContainsThisTab(parentRibbon, item) && !(bool)item.GetValue(RadItem.IsAddNewItemProperty))
                {
                    RadListBoxItem listItem = new RadListBoxItem(item.Text);
                    listItem.Tag = item;
                    this.radListBoxAvaibleTabs.Items.Add(listItem);
                }
            }
        }
Example #7
0
        private RadListBoxItem BuildRadMenuContentItem(object tag, String name, String description, Image image, Size size, Font nameFont, Font descriptionFont, Telerik.WinControls.ElementVisibility separatorVisibility, bool selectable)
        {

            RadListBoxItem tmplContactListItem = new Telerik.WinControls.UI.RadListBoxItem();
                        
            tmplContactListItem.AutoSize = true;
            tmplContactListItem.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.Auto;
            tmplContactListItem.Size = size;

            tmplContactListItem.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            tmplContactListItem.DisplayStyle = Telerik.WinControls.DisplayStyle.ImageAndText;
            tmplContactListItem.Image = image;
            tmplContactListItem.ImageAlignment = ContentAlignment.MiddleCenter;
            //
            // tmplContactListItem
            //
            tmplContactListItem.AccessibleDescription = name;
            tmplContactListItem.CanFocus = true;
            tmplContactListItem.Text = " " + name.Trim();
            tmplContactListItem.DescriptionText = " " + description.Trim();

            tmplContactListItem.ForeColor = System.Drawing.Color.Black;

            tmplContactListItem.TextSeparatorVisibility = separatorVisibility;

            tmplContactListItem.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;

            tmplContactListItem.Font = nameFont;
            tmplContactListItem.DescriptionFont = descriptionFont;
            tmplContactListItem.Tag = tag;

            tmplContactListItem.ToolTipText = null;
            
          

            tmplContactListItem.Enabled = selectable;

            tmplContactListItem.DoubleClick += new EventHandler(tmplContactListItem_DoubleClick);

            return tmplContactListItem;
        }