|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
IntroductionThe BSE.Windows.Forms.PanelThe panel is a control that contains other controls. You can use a panel to group collections of controls such as the
BSE.Windows.Forms.XPanderPanelListThe
BSE.Windows.Forms.XPanderPanel
On top of the
BSE.Windows.Forms.SplitterThis represents a splitter control that enables the user to resize docked controls. As different from the
A splitter can be attached to a panel. If the visibility of the panel changes, the visibility of the splitter changes too.
All the panelcolors and properties are customizable and changeable with the visual designer.
If you want to expand a
When the
Using the CodeRight click on the toolbox and choose add/remove items..., there you browse for the BSE.Windows.Forms.dll and press OK. All the controls will be added in the ToolBox under "My User Controls". Set Using the RightToLeft Feature in the Test SampleOpen the Program.cs file in the [STAThread]
static void Main()
{
//// if you want to use the RightToLeft demo,
//// please remove these comments
//CultureInfo currentCulture = new CultureInfo
// (BSE.Windows.Test.Properties.Settings.Default.Language);
//Thread.CurrentThread.CurrentCulture = currentCulture;
//Thread.CurrentThread.CurrentUICulture = currentCulture;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//// if you want to use the RightToLeft demo,
//// please remove these comments
//using (CCountrySelectionForm form = new CCountrySelectionForm())
//{
//form.ShowDialog();
//}
Application.Run(new Form1());
}
Select the ar-EG culture name for the Arabic (Egypt) culture:
Class DiagramsXPanderPanelList
Panel and XPanderPanel
Code ExamplesUsing the public class Form2 : Form
{
private BSE.Windows.Forms.Panel panel1;
public Form2()
{
// Create and initialize a Panel.
this.panel1 = new BSE.Windows.Forms.Panel();
this.panel1.Text = "panel1";
// Set the panel background.
this.panel1.ShowTransparentBackground = false;
// Set the panel's DockStyle to DockStyle.Fill
this.panel1.Dock = DockStyle.Fill;
// Add the panel to the form
this.Controls.Add(this.panel1);
// Create and initialize a ToolStripProfessionalRenderer.
ToolStripProfessionalRenderer renderer =
new BSE.Windows.Forms.Office2007Renderer();
// Add it to the ToolStripManager.Renderer
ToolStripManager.Renderer = renderer;
// Get the ProfessionalColorTable colorTable for the current renderer.
BSE.Windows.Forms.ProfessionalColorTable colorTable =
renderer.ColorTable as BSE.Windows.Forms.ProfessionalColorTable;
if (colorTable != null)
{
// Get the PanelColors panelColorTable for the
// current colortable.
BSE.Windows.Forms.PanelColors panelColorTable =
colorTable.PanelColorTable;
if (panelColorTable != null)
{
// Set the panel properties for the form
// controls collection
BSE.Windows.Forms.PanelSettingsManager.
SetPanelProperties(this.Controls, panelColorTable);
}
}
}
}
Adaption of the Panel ColorsCreate a public class YourPanelColors : PanelColorsOffice
{
protected override void InitColors(Dictionary<panelcolors.knowncolors>, rgbTable)
{
base.InitColors(rgbTable);
rgbTable[KnownColors.BorderColor] = Color.FromArgb(101, 147, 207);
rgbTable[KnownColors.InnerBorderColor] = Color.White;
rgbTable[KnownColors.PanelCaptionCloseIcon] = Color.Black;
rgbTable[KnownColors.PanelCaptionExpandIcon] = Color.FromArgb(21, 66, 139);
rgbTable[KnownColors.PanelCaptionGradientBegin] =
Color.FromArgb(227, 239, 255);
rgbTable[KnownColors.PanelCaptionGradientEnd] =
Color.FromArgb(173, 209, 255);
rgbTable[KnownColors.PanelCaptionGradientMiddle] =
Color.FromArgb(199, 224, 255);
rgbTable[KnownColors.PanelContentGradientBegin] =
Color.FromArgb(227, 239, 255);
rgbTable[KnownColors.PanelContentGradientEnd] =
Color.FromArgb(227, 239, 255);
rgbTable[KnownColors.PanelCaptionText] = Color.FromArgb(22, 65, 139);
rgbTable[KnownColors.PanelCollapsedCaptionText] =
Color.FromArgb(21, 66, 139);
rgbTable[KnownColors.XPanderPanelBackColor] = Color.Transparent;
rgbTable[KnownColors.XPanderPanelCaptionCloseIcon] = Color.Black;
rgbTable[KnownColors.XPanderPanelCaptionExpandIcon] =
Color.FromArgb(21, 66, 139);
rgbTable[KnownColors.XPanderPanelCaptionText] = Color.FromArgb(21, 66, 139);
rgbTable[KnownColors.XPanderPanelCaptionGradientBegin] =
Color.FromArgb(227, 239, 255);
rgbTable[KnownColors.XPanderPanelCaptionGradientEnd] =
Color.FromArgb(199, 224, 255);
rgbTable[KnownColors.XPanderPanelCaptionGradientMiddle] =
Color.FromArgb(173, 209, 255);
rgbTable[KnownColors.XPanderPanelFlatCaptionGradientBegin] =
Color.FromArgb(214, 232, 255);
rgbTable[KnownColors.XPanderPanelFlatCaptionGradientEnd] =
Color.FromArgb(253, 253, 254);
}
} </panelcolors.knowncolors>
Or you may set the Credits
|
||||||||||||||||||||||