예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NuGenSplitButton"/> class.
        /// </summary>
        /// <param name="serviceProvider"><para>Requires:</para>
        ///     <para><see cref="INuGenButtonStateTracker"/></para>
        ///     <para><see cref="INuGenSplitButtonLayoutManager"/></para>
        ///		<para><see cref="INuGenSplitButtonRenderer"/></para>
        /// </param>
        /// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
        public NuGenSplitButton(INuGenServiceProvider serviceProvider)
            : base(serviceProvider)
        {
            _components = new Container();

            _popupContainer = new NuGenPopupContainer(serviceProvider);
            _components.Add(_popupContainer);
            _popupContainer.PopupBorderStyleChanged += _popupContainer_PopupBorderStyleChanged;
            _popupContainer.PopupClosing            += _popupContainer_PopupClosing;
            _popupContainer.PopupSizeChanged        += _popupContainer_PopupSizeChanged;
            _popupContainer.HostControl              = this;
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NuGenDropDown"/> class.
        /// </summary>
        /// <param name="serviceProvider"><para>Requires:</para>
        ///     <para><see cref="INuGenButtonStateTracker"/></para>
        ///     <para><see cref="INuGenControlStateTracker"/></para>
        ///		<para><see cref="INuGenControlImageManager"/></para>
        ///		<para><see cref="INuGenPanelRenderer"/></para>
        /// </param>
        /// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
        public NuGenDropDown(INuGenServiceProvider serviceProvider)
            : base(serviceProvider)
        {
            _components = new Container();

            _popupContainer = new NuGenPopupContainer(serviceProvider);
            _components.Add(_popupContainer);
            _popupContainer.PopupBorderStyleChanged += _popupContainer_PopupBorderStyleChanged;
            _popupContainer.PopupClosing            += _popupContainer_PopupClosing;
            _popupContainer.PopupSizeChanged        += _popupContainer_PopupSizeChanged;
            _popupContainer.HostControl              = this;

            this.AutoSize  = true;
            this.BackColor = SystemColors.Window;
            this.Width     = this.DefaultSize.Width;
        }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NuGenDropDown"/> class.
        /// </summary>
        /// <param name="serviceProvider"><para>Requires:</para>
        ///     <para><see cref="INuGenButtonStateTracker"/></para>
        ///     <para><see cref="INuGenControlStateTracker"/></para>
        ///		<para><see cref="INuGenControlImageManager"/></para>
        ///		<para><see cref="INuGenDropDownRenderer"/></para>
        ///		<para><see cref="INuGenPanelRenderer"/></para>
        /// </param>
        /// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
        public NuGenDropDown(INuGenServiceProvider serviceProvider)
            : base(serviceProvider)
        {
            _components = new Container();

            _popupContainer = new NuGenPopupContainer(serviceProvider);
            _components.Add(_popupContainer);
            _popupContainer.PopupBorderStyleChanged += _popupContainer_PopupBorderStyleChanged;
            _popupContainer.PopupClosing            += _popupContainer_PopupClosing;
            _popupContainer.PopupSizeChanged        += _popupContainer_PopupSizeChanged;
            _popupContainer.HostControl              = this;

            this.AutoSize  = true;
            this.BackColor = SystemColors.Window;
            this.Width     = this.DefaultSize.Width;

            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.UserPaint, true);
        }
예제 #4
0
		/// <summary>
		/// Initializes a new instance of the <see cref="NuGenDropDown"/> class.
		/// </summary>
		/// <param name="serviceProvider"><para>Requires:</para>
		/// 	<para><see cref="INuGenButtonStateTracker"/></para>
		/// 	<para><see cref="INuGenControlStateTracker"/></para>
		///		<para><see cref="INuGenControlImageManager"/></para>
		///		<para><see cref="INuGenDropDownRenderer"/></para>
		///		<para><see cref="INuGenPanelRenderer"/></para>
		/// </param>
		/// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
		public NuGenDropDown(INuGenServiceProvider serviceProvider)
			: base(serviceProvider)
		{
			_components = new Container();

			_popupContainer = new NuGenPopupContainer(serviceProvider);
			_components.Add(_popupContainer);
			_popupContainer.PopupBorderStyleChanged += _popupContainer_PopupBorderStyleChanged;
			_popupContainer.PopupClosing += _popupContainer_PopupClosing;
			_popupContainer.PopupSizeChanged += _popupContainer_PopupSizeChanged;
			_popupContainer.HostControl = this;

			this.AutoSize = true;
			this.BackColor = SystemColors.Window;
			this.Width = this.DefaultSize.Width;

			this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
			this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
			this.SetStyle(ControlStyles.UserPaint, true);
		}
예제 #5
0
		/// <summary>
		/// Initializes a new instance of the <see cref="NuGenSplitButton"/> class.
		/// </summary>
		/// <param name="serviceProvider"><para>Requires:</para>
		/// 	<para><see cref="INuGenButtonStateTracker"/></para>
		/// 	<para><see cref="INuGenSplitButtonLayoutManager"/></para>
		///		<para><see cref="INuGenSplitButtonRenderer"/></para>
		/// </param>
		/// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
		public NuGenSplitButton(INuGenServiceProvider serviceProvider)
			: base(serviceProvider)
		{
			_components = new Container();

			_popupContainer = new NuGenPopupContainer(serviceProvider);
			_components.Add(_popupContainer);
			_popupContainer.PopupBorderStyleChanged += _popupContainer_PopupBorderStyleChanged;
			_popupContainer.PopupClosing += _popupContainer_PopupClosing;
			_popupContainer.PopupSizeChanged += _popupContainer_PopupSizeChanged;
			_popupContainer.HostControl = this;
		}
예제 #6
0
		/// <summary>
		/// Initializes a new instance of the <see cref="NuGenDropDown"/> class.
		/// </summary>
		/// <param name="serviceProvider"><para>Requires:</para>
		/// 	<para><see cref="INuGenButtonStateTracker"/></para>
		/// 	<para><see cref="INuGenControlStateTracker"/></para>
		///		<para><see cref="INuGenControlImageManager"/></para>
		///		<para><see cref="INuGenPanelRenderer"/></para>
		/// </param>
		/// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception>
		public NuGenDropDown(INuGenServiceProvider serviceProvider)
			: base(serviceProvider)
		{
			_components = new Container();

			_popupContainer = new NuGenPopupContainer(serviceProvider);
			_components.Add(_popupContainer);
			_popupContainer.PopupBorderStyleChanged += _popupContainer_PopupBorderStyleChanged;
			_popupContainer.PopupClosing += _popupContainer_PopupClosing;
			_popupContainer.PopupSizeChanged += _popupContainer_PopupSizeChanged;
			_popupContainer.HostControl = this;

			this.AutoSize = true;
			this.BackColor = SystemColors.Window;
			this.Width = this.DefaultSize.Width;
		}