Added code to minimize and resize ribbon

This commit is contained in:
Rich 2009-05-19 19:50:12 +00:00
parent 51c044791c
commit 291f354893
3 changed files with 27 additions and 0 deletions

View File

@ -33,6 +33,17 @@ namespace Volian.Controls.Library
private int _UniqueBarCount;
private ItemInfo _MyItemInfo = null;
private StepItem _MyStepItem = null;
private bool _RibbonExpanded=true;
public bool RibbonExpanded
{
get { return _RibbonExpanded; }
set
{
_RibbonExpanded = value;
foreach (DisplayTabItem tabItem in _MyDisplayTabItems.Values)
tabItem.MyStepTabPanel.MyStepTabRibbon.Expanded = _RibbonExpanded;
}
}
#endregion
#region Events
/// <summary>

View File

@ -14,6 +14,11 @@ namespace Volian.Controls.Library
#region Private Fields
private DisplayTabControl _MyDisplayTabControl;
private StepTabRibbon _MyStepTabRibbon;
public StepTabRibbon MyStepTabRibbon
{
get { return _MyStepTabRibbon; }
set { _MyStepTabRibbon = value; }
}
private StepPanel _MyStepPanel;
private DisplayTabItem _MyDisplayTabItem;
#endregion
@ -100,6 +105,7 @@ namespace Volian.Controls.Library
//_MyTabRibbon.MyDisplayRTB = null;
_MyStepTabRibbon.MyStepItem = null;
this.Controls.Add(_MyStepTabRibbon);
_MyStepTabRibbon.Expanded = _MyDisplayTabControl.RibbonExpanded;
}
/// <summary>
/// Setup this within control

View File

@ -90,6 +90,16 @@ namespace Volian.Controls.Library
public StepTabRibbon()
{
InitializeComponent();
_RibbonControl.SizeChanged += new EventHandler(_RibbonControl_SizeChanged);
}
void _RibbonControl_SizeChanged(object sender, EventArgs e)
{
this.Size = _RibbonControl.Size;
}
public bool Expanded
{
get { return _RibbonControl.Expanded; }
set { _RibbonControl.Expanded = value; }
}
#endregion
#region Events