Exemple #1
0
        public ItemPanel()
        {
            m_ItemContainer = new ItemContainer();
            m_ItemContainer.GlobalItem = false;
            m_ItemContainer.ContainerControl = this;
            m_ItemContainer.Stretch = false;
            m_ItemContainer.Displayed = true;
            m_ItemContainer.Style = eDotNetBarStyle.Office2007;
            this.ColorScheme.Style = eDotNetBarStyle.Office2007;
            m_ItemContainer.SetOwner(this);
            m_ItemContainer.SetSystemContainer(true);

            this.SetBaseItemContainer(m_ItemContainer);
            m_ItemContainer.Style = eDotNetBarStyle.Office2007;

            this.DragDropSupport = true;

            if (BarFunctions.IsWindows7 && Touch.TouchHandler.IsTouchEnabled)
            {
                _TouchHandler = new DevComponents.DotNetBar.Touch.TouchHandler(this, Touch.eTouchHandlerType.Gesture);
                _TouchHandler.PanBegin += new EventHandler<DevComponents.DotNetBar.Touch.GestureEventArgs>(TouchHandlerPanBegin);
                _TouchHandler.Pan += new EventHandler<DevComponents.DotNetBar.Touch.GestureEventArgs>(TouchHandlerPan);
                _TouchHandler.PanEnd += new EventHandler<DevComponents.DotNetBar.Touch.GestureEventArgs>(TouchHandlerPanEnd);
            }
        }
Exemple #2
0
		public RibbonBar()
		{
            //this.BackColor = Color.Transparent;
			m_ItemContainer=new ItemContainer();
			m_ItemContainer.GlobalItem=false;
			m_ItemContainer.ContainerControl=this;
			m_ItemContainer.Stretch=false;
			m_ItemContainer.Displayed=true;
			m_ItemContainer.Style=eDotNetBarStyle.StyleManagerControlled;
			this.ColorScheme.Style=eDotNetBarStyle.StyleManagerControlled;
			m_ItemContainer.SetOwner(this);
			m_ItemContainer.SetSystemContainer(true);
			this.SetBaseItemContainer(m_ItemContainer);
            this.DragDropSupport = true;
			m_TitleStyle=new ElementStyle();
			m_TitleStyle.SetColorScheme(this.GetColorScheme());
			m_TitleStyle.StyleChanged+=new EventHandler(ElementStyleChanged);

            m_TitleStyleMouseOver = new ElementStyle();
            m_TitleStyleMouseOver.SetColorScheme(this.GetColorScheme());
            m_TitleStyleMouseOver.StyleChanged += new EventHandler(ElementStyleChanged);

            m_BackgroundMouseOverStyle.SetColorScheme(this.GetColorScheme());
            m_BackgroundMouseOverStyle.StyleChanged += new EventHandler(this.VisualPropertyChanged);

            this.ItemAdded += new EventHandler(RibbonBar_ItemAdded);
            this.ItemRemoved += new ItemRemovedEventHandler(RibbonBar_ItemRemoved);
		}