Source/SideBarContainerItem.cs

(开头部分) 11KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Drawing;

namespace DevComponents.DotNetBar
{
	/// <summary>
	/// Provides layout for Side-Bar control.
	/// </summary>
	[System.ComponentModel.ToolboxItem(false),System.ComponentModel.DesignTimeVisible(false)]
	public class SideBarContainerItem:ImageItem, IDesignTimeProvider
	{
		#region Private Variables
		private eSideBarAppearance m_Appearance=eSideBarAppearance.Traditional;
		private bool m_ProcessingExpanded=false;
		private int m_ItemSpacing=1;
		#endregion

		#region Internal Implementation
		/// <summary>
		/// Creates new instance of SideBarContainerItem class.
		/// </summary>
		public SideBarContainerItem()
		{
			m_IsContainer=true;
			m_SystemItem=true;
			m_SupportedOrientation=eSupportedOrientation.Horizontal;
            m_AllowOnlyOneSubItemExpanded = false;
		}
		/// <summary>
		/// Returns copy of SideBarContainerItem item
		/// </summary>
		public override BaseItem Copy()
		{
			SideBarContainerItem objCopy=new SideBarContainerItem();
			this.CopyToItem(objCopy);
			return objCopy;
		}
		protected override void CopyToItem(BaseItem copy)
		{
			SideBarContainerItem objCopy=copy as SideBarContainerItem;
			base.CopyToItem(objCopy);
		}

		/// <summary>
		/// Recalculates the size of the item
		/// </summary>
		public override void RecalcSize()
		{
			// This container will always have one and only one item expanded at the time.
			// Recalculation of the size for this item is different then rest of the DotNetBar.
			// This container always takes the size assigned by the Control and never changes
			// the Size by itself.
			int iUnexpandItemsHeight=0;
			int iTotalHeight=0;
			bool bOverflow=false;		// Too many items so there is no need to stretch the expanded since it can't fit

			if(m_SubItems!=null)
			{
				SideBarPanelItem expanded=null;
				foreach(BaseItem item in m_SubItems)
后面还有 377 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。