Пример #1
0
        public HeaderedItem(IDrawableRectangle headerCollapsed,
                            IDrawableRectangle headerExpanded,
                            IDrawableRectangle content)
        {
            this.headerCollapsed = headerCollapsed;
            this.headerExpanded  = headerExpanded;
            this.content         = content;

            headerCollapsed.Container = this;
            headerExpanded.Container  = this;
            content.Container         = this;

            headerCollapsed.X = 0;
            headerCollapsed.Y = 0;

            headerExpanded.X = 0;
            headerExpanded.Y = 0;

            content.X = 0;
            content.Y = headerExpanded.GetAbsoluteContentHeight();

            headerExpanded.HeightChanged += delegate { content.Y = headerExpanded.GetAbsoluteContentHeight(); };
        }
Пример #2
0
		public HeaderedItem(IDrawableRectangle headerCollapsed,
		                    IDrawableRectangle headerExpanded,
		                    IDrawableRectangle content)
		{
			this.headerCollapsed = headerCollapsed;
			this.headerExpanded = headerExpanded;
			this.content = content;
			
			headerCollapsed.Container = this;
			headerExpanded.Container = this;
			content.Container = this;
			
			headerCollapsed.X = 0;
			headerCollapsed.Y = 0;
			
			headerExpanded.X = 0;
			headerExpanded.Y = 0;
				
			content.X = 0;
			content.Y = headerExpanded.GetAbsoluteContentHeight();
			
			headerExpanded.HeightChanged += delegate { content.Y = headerExpanded.GetAbsoluteContentHeight(); };
		}
Пример #3
0
 protected override void OnHeightChanged()
 {
     headerCollapsed.Height = headerCollapsed.GetAbsoluteContentHeight();
     headerExpanded.Height  = headerExpanded.GetAbsoluteContentHeight();
     content.Height         = content.GetAbsoluteContentHeight();
 }