#region Styling CollapseUI Button on UltraSplitter
private void styleCollapseUI_Click(object sender, EventArgs e)
{
// Set Back color for Collapse/Restore UI button on ultraSplitter
this.ultraSplitter1.ButtonAppearance.BackColor = Color.DarkCyan;
this.ultraSplitter2.ButtonAppearance.BackColor = Color.DarkCyan;
// Set Collapse/Restore buttons style
this.ultraSplitter1.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Button3D;
this.ultraSplitter2.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2007RibbonButton;
// Set Collpase/Restore button Extent
this.ultraSplitter1.ButtonExtent = 100;
this.ultraSplitter2.ButtonExtent = 130;
// Set Appearance when Collapse/Restore UI button is hot tracked
this.ultraSplitter1.HotTrackingButtonAppearance.BackColor = Color.Green;
this.ultraSplitter2.HotTrackingButtonAppearance.BackColor = Color.Green;
// Set Appearance when Collapse/Restore UI button is pressed
this.ultraSplitter1.PressedButtonAppearance.BackColor = Color.Fuchsia;
this.ultraSplitter2.PressedButtonAppearance.BackColor = Color.Fuchsia;
}
#region Styling Button when UltraSplitter is collapsed
private void collapsedUIButton_Click(object sender, EventArgs e)
{
// Collpase Splitter control.
this.ultraSplitter1.Collapsed = true;
this.ultraSplitter2.Collapsed = true;
// Set Appearance for Collapse/Restore UI button, when collapsed
this.ultraSplitter1.CollapsedButtonAppearance.BackColor = Color.Red;
this.ultraSplitter2.CollapsedButtonAppearance.BackColor = Color.Red;
}
#endregion // Styling Button when UltraSplitter is collapsed
#region Restore UltraSplitter
private void restoreSplitter2_Click(object sender, EventArgs e)
{
// Restore Splitter control
this.ultraSplitter1.Collapsed = false;
this.ultraSplitter2.Collapsed = false;
}
#endregion // Restore UltraSplitter
#endregion //Styling CollapseUI Button on UltraSplitter