Latest source merged from Syncfusion
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: post
|
||||
title: Array and Table Formulas in Essential Calculate
|
||||
description: Explains about the support of array and table formulas in Essential Calculate
|
||||
title: Array and Table Formulas in Syncfusion Essential Calculate
|
||||
description: Explains about the support of array and table formulas in the Syncfusion Essential Calculate control
|
||||
platform: windowsforms
|
||||
control: Calculate
|
||||
documentation: ug
|
||||
|
|
|
@ -357,3 +357,29 @@ calendar.ShowWeekNumber = True
|
|||
{% endtabs %}
|
||||
|
||||
![SfCalendar shows week number](appearance-images/showweeknumber.png)
|
||||
|
||||
## Configure the calculation of week number based on culture
|
||||
|
||||
You can get the current week number in `SfCalendar` control by changing the `CalendarWeekRule` property value of date time format in `CultureInfo`. The default value of `CalendarWeekRule` property is `FirstDay`.
|
||||
|
||||
{% tabs %}
|
||||
|
||||
{% highlight C# %}
|
||||
|
||||
SfCalendar sfCalendar1 = new SfCalendar();
|
||||
CultureInfo info = new CultureInfo("en-EN");
|
||||
info.DateTimeFormat.CalendarWeekRule = CalendarWeekRule.FirstFullWeek;
|
||||
sfCalendar1.Culture = info;
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
{% highlight VB %}
|
||||
|
||||
Dim sfCalendar1 As SfCalendar = New SfCalendar()
|
||||
Dim info As CultureInfo = New CultureInfo("en-EN")
|
||||
info.DateTimeFormat.CalendarWeekRule = CalendarWeekRule.FirstFullWeek
|
||||
sfCalendar1.Culture = info
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
{% endtabs %}
|
|
@ -9,7 +9,7 @@ documentation: ug
|
|||
|
||||
# Navigation in Windows Forms Calendar (SfCalendar)
|
||||
|
||||
By default, the calendar displays the month view. You can move from current month to previous or next month in the calendar control by clicking navigation buttons in the header, and also you can move from month view to other views (year, decade, century) to select the dates from other year or decade by click the header text of the calendar.
|
||||
By default, the calendar displays the month view. You can move from current month to previous or next month in the calendar control by clicking navigation buttons in the header, and also you can move from month view to other views (year, decade, century) to select the dates from other year or decade by clicking the header text of the calendar.
|
||||
|
||||
## Different views
|
||||
|
||||
|
|
После Ширина: | Высота: | Размер: 35 KiB |
|
@ -393,3 +393,27 @@ calendar.ClearSelection(new DateTime(2018, 02, 16));
|
|||
{% endtabs %}
|
||||
|
||||
![Clear selection dates](selection-images/selection.png)
|
||||
|
||||
## Disable weekends from selection
|
||||
|
||||
Weekends of the calendar can be disabled by providing the Date collection to [BlackoutDates](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.Input.SfCalendar.html#Syncfusion_WinForms_Input_SfCalendar_BlackoutDates). The following code snippet illustrates how to disable weekends from selection:
|
||||
|
||||
{% tabs %}
|
||||
|
||||
{% highlight C# %}
|
||||
|
||||
// disabling the weekends
|
||||
|
||||
sfCalendar1.MinDate = new DateTime(2000, 1, 05);
|
||||
sfCalendar1.MaxDate = new DateTime(2500, 1, 25);
|
||||
for (var date = sfCalendar1.MinDate; date <= sfCalendar1.MaxDate; date = date.AddDays(1))
|
||||
{
|
||||
if (date.DayOfWeek == DayOfWeek.Sunday || date.DayOfWeek == DayOfWeek.Saturday)
|
||||
sfCalendar1.BlackoutDates.Add(date);
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
{% endtabs %}
|
||||
|
||||
![Disable WeekEnds](selection-images/disable_Weekends.png)
|
||||
|
|
|
@ -97,7 +97,7 @@ No</td><td>
|
|||
No</td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
Drop-Down Close by Click</td><td>
|
||||
Drop-Down Close by clicking</td><td>
|
||||
Yes:1</td><td>
|
||||
Yes:2</td><td>
|
||||
Yes:3</td><td>
|
||||
|
|
|
@ -97,6 +97,113 @@ End Class
|
|||
|
||||
[View sample in GitHub](https://github.com/SyncfusionExamples/How-to-bind-the-data-in-WinForms-SfComboBox)
|
||||
|
||||
|
||||
## Binding Data from Microsoft Access
|
||||
|
||||
SfComboBox control supports to bind data from Microsoft Access database. This section describes about how to bind the data from Microsoft Access database to SfComboBox.
|
||||
|
||||
### Importing Microsoft Access Database
|
||||
To load the data from Microsoft Access database, follow the below steps.
|
||||
|
||||
1) On the **View** menu, select **Other Windows > Data Sources**.
|
||||
|
||||
2) In the **Data Sources** window, click **Add New Data Source**, the DataSource configuration wizard will be opened.
|
||||
|
||||
![Choose the datasource type through the visual studio](DataBinding_images/DataBinding_img1.jpeg)
|
||||
|
||||
3) Select **Database** on the **Choose a Data Source Type** page, and then select **Next**.
|
||||
|
||||
![Choose the datasource model through the visual studio](DataBinding_images/DataBinding_img2.jpeg)
|
||||
|
||||
4) On the **Choose your Data Connection** page, select **New Connection** to configure a new data connection and Change the **Data source** to **.NET Framework Data Provider for OLE DB**.
|
||||
|
||||
![Choose the data connetion through the visual studio](DataBinding_images/DataBinding_img3.jpeg)
|
||||
|
||||
5) In **OLE DB Provider**, select **Microsoft Office 12.0 Access Database Engine OLE DB Provider**. In **Server or file name**, specify the path and name of the .accdb file to which want to connect, and then select **OK**.
|
||||
|
||||
![Choose the data provider through the visual studio](DataBinding_images/DataBinding_img4.jpeg)
|
||||
|
||||
6) Select **Next** on the **Choose your Data Connection** page.
|
||||
|
||||
7) Select **Next** on the **Save connection string to the Application Configuration file** page.
|
||||
|
||||
8) Expand the **Tables** node on the **Choose your Database Objects** page.
|
||||
|
||||
![Choose the data base objects through the visual studio](DataBinding_images/DataBinding_img5.jpg)
|
||||
|
||||
9) Select whatever tables or views in the dataset, and then select **Finish**.
|
||||
|
||||
### Loading Data from Microsoft Access Database
|
||||
To access the Microsoft Access database, follow the below steps.
|
||||
1) The **DataSource** property can be customized at designer level like below,
|
||||
|
||||
![Choose the data source through the visual studio](DataBinding_images/DataBinding_img6.jpg)
|
||||
|
||||
2) The value for **DisplayMember** and **ValueMember** properties can be selected as like below,
|
||||
|
||||
![Choose the display member through the visual studio](DataBinding_images/DataBinding_img7.jpg)
|
||||
|
||||
![Choose the value member through the visual studio](DataBinding_images/DataBinding_img8.jpg)
|
||||
|
||||
3) Based on the **DataSource** binding with the SfComboBox control, the items can be displayed by using **DisplayMember** and **ValueMember** properties.
|
||||
|
||||
![Displayed the items using data source binding through the visual studio](DataBinding_images/DataBinding_img9.jpg)
|
||||
|
||||
## Binding Data from LINQ to SQL
|
||||
SfComboBox control supports to bind data from LINQ to SQL. This walkthrough, describes about binding data from LINQ to SQL and save back the changes to the Database.
|
||||
|
||||
### Adding Data Model using LINQ to SQL
|
||||
To create data model using LINQ to SQL in WF project follow the below steps.
|
||||
1) Right click on the project, Select **Add** option and then click **New Item**.
|
||||
2) The Add New Item wizard appears, Select **LINQ to SQL Classes** from the **Visual C#**.
|
||||
3) Name the file as **Northwind** and then select **Add** option to add the **Northwind.dbml** in the project.
|
||||
|
||||
![Choose the data model from LINQ to SQL from the visual studio](DataBinding_images/DataBinding_img10.jpeg)
|
||||
|
||||
4) Once the **Northwind.dbml** is added in the project, then the design view is opened.
|
||||
|
||||
![Connect the database through the visual studio](DataBinding_images/DataBinding_img11.jpeg)
|
||||
|
||||
5) New Database connection can be added by clicking add icon button in Server Explorer.
|
||||
|
||||
6) The **Add Connection** wizard appeared with the default data source as **Microsoft SQL Server Database File (SqlClient**).
|
||||
|
||||
![Connect the database through the visual studio](DataBinding_images/DataBinding_img12.jpeg)
|
||||
|
||||
7) Click **Change** to open the **Change Data Source** dialog box and select the type of data source as **Microsoft SQL Server Database File (SqlClient).**
|
||||
|
||||
![Change the database through the visual studio](DataBinding_images/DataBinding_img13.jpeg)
|
||||
|
||||
8) Select the Database file name and click on **Test Connection** to check the connection with the database.
|
||||
|
||||
![Choose the database through the visual studio](DataBinding_images/DataBinding_img14.jpeg)
|
||||
|
||||
9) Once the connection is succeeded, click **OK** button to add database in the server explorer.
|
||||
|
||||
![Connected databases in the projects](DataBinding_images/DataBinding_img15.jpg)
|
||||
|
||||
10) Drag **Employees** table in to design view of **Northwind.dbml**. The Entity model diagram for **Employees** table is generated once it is dropped in to design view.
|
||||
|
||||
|
||||
### Loading Data from LINQ to SQL Classes
|
||||
|
||||
The data from the defined data model of the LINQ to SQL classes can be loaded as a data source to the SfComboBox by loading the **Employees** table by the created data context for the **Northwnd** database.
|
||||
|
||||
1) The **DataSource** property can be customized at designer level like below,
|
||||
|
||||
![Choose the data source through the visual studio](DataBinding_images/DataBinding_img6.jpg)
|
||||
|
||||
2) The value for **DisplayMember** and **ValueMember** properties can be selected as like below,
|
||||
|
||||
![Choose the display member through the visual studio](DataBinding_images/DataBinding_img7.jpg)
|
||||
|
||||
![Choose the value member through the visual studio](DataBinding_images/DataBinding_img8.jpg)
|
||||
|
||||
3) Based on the **DataSource** binding with the SfComboBox control, the items can be displayed by using **DisplayMember** and **ValueMember** properties.
|
||||
|
||||
![Displayed the items using data source binding through the visual studio](DataBinding_images/DataBinding_img9.jpg)
|
||||
|
||||
|
||||
## See Also
|
||||
|
||||
[How to disable some items WinForms ComboBox dropdown?](https://www.syncfusion.com/kb/11254/how-to-disable-some-items-winforms-combobox-dropdown)
|
||||
|
|
После Ширина: | Высота: | Размер: 17 KiB |
После Ширина: | Высота: | Размер: 30 KiB |
После Ширина: | Высота: | Размер: 12 KiB |
После Ширина: | Высота: | Размер: 18 KiB |
После Ширина: | Высота: | Размер: 17 KiB |
После Ширина: | Высота: | Размер: 18 KiB |
После Ширина: | Высота: | Размер: 21 KiB |
После Ширина: | Высота: | Размер: 18 KiB |
После Ширина: | Высота: | Размер: 33 KiB |
После Ширина: | Высота: | Размер: 21 KiB |
После Ширина: | Высота: | Размер: 27 KiB |
После Ширина: | Высота: | Размер: 48 KiB |
После Ширина: | Высота: | Размер: 48 KiB |
После Ширина: | Высота: | Размер: 48 KiB |
После Ширина: | Высота: | Размер: 6.6 KiB |
|
@ -79,6 +79,47 @@ End Sub
|
|||
{% endhighlight %}
|
||||
{% endtabs %}
|
||||
|
||||
## Customizing drop-down position
|
||||
|
||||
The `SfComboBox` allows to change the position of the dropdown list by using the `DropDownPosition` property. The default value is `PopupRelativeAlignment.Center`.
|
||||
|
||||
{% tabs %}
|
||||
|
||||
{% highlight c# %}
|
||||
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
Syncfusion.WinForms.ListView.SfComboBox sfComboBox1 = new Syncfusion.WinForms.ListView.SfComboBox();
|
||||
sfComboBox1.DropDownPosition = Syncfusion.WinForms.Core.Enums.PopupRelativeAlignment.RightTop;
|
||||
sfComboBox1.Location = new Point(300, 180);
|
||||
sfComboBox1.Size = new Size(120, 30);
|
||||
sfComboBox1.ThemeName = "Office2016Colorful";
|
||||
|
||||
List<string> usStates = new List<string>();
|
||||
usStates.Add("Alaska");
|
||||
usStates.Add("Arizona");
|
||||
usStates.Add("Arkansas");
|
||||
usStates.Add("California");
|
||||
usStates.Add("Colorado");
|
||||
usStates.Add("Connecticut");
|
||||
usStates.Add("Delaware");
|
||||
usStates.Add("Florida");
|
||||
usStates.Add("Georgia");
|
||||
sfComboBox1.DataSource = usStates;
|
||||
|
||||
this.Controls.Add(sfComboBox1);
|
||||
}
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
{% endtabs %}
|
||||
|
||||
![Dropdown with position](DropDown_images/DropDown_img4.png)
|
||||
|
||||
## Load custom control in drop-down
|
||||
|
||||
SfComboBox allows you to show the header and footer items in drop-down by enabling the [SfComboBox.DropDownListView.ShowHeader](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.ListView.SfListView.html#Syncfusion_WinForms_ListView_SfListView_ShowHeader) and [SfComboBox.DropDownListView.ShowFooter](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.ListView.SfListView.html#Syncfusion_WinForms_ListView_SfListView_ShowFooter) properties. This also allows you to load a custom control using the [SfComboBox.DropDownListView.HeaderControl](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.ListView.SfListView.html#Syncfusion_WinForms_ListView_SfListView_HeaderControl) and [SfComboBox.DropDownListView.FooterControl](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.ListView.SfListView.html#Syncfusion_WinForms_ListView_SfListView_FooterControl) properties.
|
||||
|
|
После Ширина: | Высота: | Размер: 3.2 KiB |
|
@ -7,7 +7,7 @@ control: SfComboBox
|
|||
documentation: ug
|
||||
---
|
||||
|
||||
# Selection
|
||||
# Selection in SfComboBox
|
||||
|
||||
The SfComboBox allows you to select single or multiple items in the drop-down list. The selection mode can be set by using the [ComboBoxMode](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.ListView.SfComboBox.html#Syncfusion_WinForms_ListView_SfComboBox_ComboBoxMode) property.
|
||||
|
||||
|
@ -268,3 +268,95 @@ Private Sub SfComboBox1_ToolTipOpening(ByVal sender As Object, ByVal e As ComboB
|
|||
End Sub
|
||||
{% endhighlight %}
|
||||
{% endtabs %}
|
||||
|
||||
|
||||
## Clear selection
|
||||
|
||||
The `SfComboBox` allows to show or hide the clear button by using the `ShowClearButton` property. When pressing the clear button it will clear the selected items and editor portion.
|
||||
|
||||
N> This clear button will be visible only when the selection or editing takes place inside the SfComboBox.
|
||||
|
||||
{% tabs %}
|
||||
|
||||
{% highlight c# %}
|
||||
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
Syncfusion.WinForms.ListView.SfComboBox sfComboBox1 = new Syncfusion.WinForms.ListView.SfComboBox();
|
||||
sfComboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
|
||||
sfComboBox1.Location = new Point(300, 180);
|
||||
sfComboBox1.Size = new Size(120, 30);
|
||||
sfComboBox1.ShowClearButton = true;
|
||||
sfComboBox1.ThemeName = "Office2016Colorful";
|
||||
|
||||
List<string> usStates = new List<string>();
|
||||
usStates.Add("Alaska");
|
||||
usStates.Add("Arizona");
|
||||
usStates.Add("Arkansas");
|
||||
usStates.Add("California");
|
||||
usStates.Add("Colorado");
|
||||
usStates.Add("Connecticut");
|
||||
usStates.Add("Delaware");
|
||||
usStates.Add("Florida");
|
||||
usStates.Add("Georgia");
|
||||
sfComboBox1.DataSource = usStates;
|
||||
|
||||
this.Controls.Add(sfComboBox1);
|
||||
}
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
{% endtabs %}
|
||||
|
||||
![ClearButton image](Selection_images/Selection_img9.png)
|
||||
|
||||
### Clear button appearance
|
||||
|
||||
Appearance of the clear button can be customized by setting the `ClearButtonStyle` property.
|
||||
|
||||
{% tabs %}
|
||||
|
||||
{% highlight c# %}
|
||||
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
Syncfusion.WinForms.ListView.SfComboBox sfComboBox1 = new Syncfusion.WinForms.ListView.SfComboBox();
|
||||
sfComboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
|
||||
sfComboBox1.Location = new Point(300, 180);
|
||||
sfComboBox1.Size = new Size(120, 30);
|
||||
sfComboBox1.ShowClearButton = true;
|
||||
sfComboBox1.ThemeName = "Office2016Colorful";
|
||||
|
||||
List<string> usStates = new List<string>();
|
||||
usStates.Add("Alaska");
|
||||
usStates.Add("Arizona");
|
||||
usStates.Add("Arkansas");
|
||||
usStates.Add("California");
|
||||
usStates.Add("Colorado");
|
||||
usStates.Add("Connecticut");
|
||||
usStates.Add("Delaware");
|
||||
usStates.Add("Florida");
|
||||
usStates.Add("Georgia");
|
||||
sfComboBox1.DataSource = usStates;
|
||||
|
||||
sfComboBox1.Style.ClearButtonStyle.BackColor = Color.Yellow;
|
||||
sfComboBox1.Style.ClearButtonStyle.ForeColor = Color.Red;
|
||||
sfComboBox1.Style.ClearButtonStyle.HoverBackColor = Color.OrangeRed;
|
||||
sfComboBox1.Style.ClearButtonStyle.HoverForeColor = Color.Yellow;
|
||||
|
||||
this.Controls.Add(sfComboBox1);
|
||||
}
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
{% endtabs %}
|
||||
|
||||
![ClearButton with appearance](Selection_images/Selection_img10.png)
|
||||
|
|
После Ширина: | Высота: | Размер: 851 B |
После Ширина: | Высота: | Размер: 4.2 KiB |
|
@ -66,7 +66,7 @@ No</td><td>
|
|||
No</td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
Drop-Down Close by Click</td><td>
|
||||
Drop-Down Close by clicking</td><td>
|
||||
Yes:1</td><td>
|
||||
Yes:2</td><td>
|
||||
Yes:3</td><td>
|
||||
|
|
|
@ -742,7 +742,7 @@ TryCast(Me.sfDataGrid1.Columns("IsClosed"), GridCheckBoxColumn).AllowCheckBoxOnH
|
|||
|
||||
All the checkboxes in a column will be checked/unchecked by clicking on the CheckBox in the header.
|
||||
|
||||
![Winforms datagrid shows to display the all checked/unchecked by click on the checkbox in the header in datagrid windows form](ColumnTypes_images/ColumnTypes_img22.png)
|
||||
![Winforms datagrid shows to display the all checked/unchecked by clicking on the checkbox in the header in datagrid windows form](ColumnTypes_images/ColumnTypes_img22.png)
|
||||
|
||||
By default, enabling the [AllowCheckBoxOnHeader](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.DataGrid.GridCheckBoxColumn.html#Syncfusion_WinForms_DataGrid_GridCheckBoxColumn_AllowCheckBoxOnHeader) property will display the checkbox with text on the header cell of [GridCheckBoxColumn](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.DataGrid.GridCheckBoxColumn.html). The text in the header cell can be disabled by setting empty value for the [HeaderText](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.DataGrid.GridColumnBase.html#Syncfusion_WinForms_DataGrid_GridColumnBase_HeaderText) property of the column.
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ Me.dateTimeEdit.Width = 294
|
|||
|
||||
## Show Week Numbers
|
||||
|
||||
Week numbers can be displayed by setting `[ShowWeekNumbers](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.Input.SfCalendar.html#Syncfusion_WinForms_Input_SfCalendar_ShowWeekNumbers) property as `true`.
|
||||
Week numbers can be displayed by setting [ShowWeekNumbers](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.Input.SfCalendar.html#Syncfusion_WinForms_Input_SfCalendar_ShowWeekNumbers) property as `true`.
|
||||
|
||||
{% tabs %}
|
||||
|
||||
|
|
|
@ -237,3 +237,29 @@ Me.dateTimeEdit.ShowUpDown = true
|
|||
{% endtabs %}
|
||||
|
||||
![Up down DateTimeEdit](getting-started-images/daterange.png)
|
||||
|
||||
## Configure the calculation of week number based on culture
|
||||
|
||||
You can get the current week number in `SfDateTimeEdit` control by changing the `CalendarWeekRule` property value of date time format in `CultureInfo`. The default value of `CalendarWeekRule` property is `FirstDay`.
|
||||
|
||||
{% tabs %}
|
||||
|
||||
{% highlight C# %}
|
||||
|
||||
SfDateTimeEdit sfdateTimeEdit1 = new SfDateTimeEdit();
|
||||
CultureInfo info = new CultureInfo("en-EN");
|
||||
info.DateTimeFormat.CalendarWeekRule = CalendarWeekRule.FirstFullWeek;
|
||||
sfdateTimeEdit1.Culture = info;
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
{% highlight VB %}
|
||||
|
||||
Dim sfdateTimeEdit1 As SfDateTimeEdit = New SfDateTimeEdit()
|
||||
Dim info As CultureInfo = New CultureInfo("en-EN")
|
||||
info.DateTimeFormat.CalendarWeekRule = CalendarWeekRule.FirstFullWeek
|
||||
sfdateTimeEdit1.Culture = info
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
{% endtabs %}
|
||||
|
|
После Ширина: | Высота: | Размер: 20 KiB |
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
layout: post
|
||||
title: Button-Parameters | WindowsForms | Syncfusion
|
||||
description: Button Parameters
|
||||
description: Learn about various button parameters, Right to Left, Details view and Resizing support in Windows Forms MessageBoxAdv
|
||||
platform: WindowsForms
|
||||
control: MessageBoxAdv
|
||||
documentation: ug
|
||||
---
|
||||
|
||||
# Parameters
|
||||
# Button Parameters in Windows Forms MessageBox (MessageBoxAdv)
|
||||
|
||||
[Show](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.MessageBoxAdv.html#Syncfusion_Windows_Forms_MessageBoxAdv_Show_System_String_) function helps to display a MessageBoxAdv. This section explains regarding the parameters available in [Show](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.MessageBoxAdv.html#Syncfusion_Windows_Forms_MessageBoxAdv_Show_System_String_) function.
|
||||
|
||||
|
@ -303,3 +303,26 @@ Eg: Collapsed view
|
|||
|
||||
![Collapsed view](MessageBoxAdv_images/MessageBoxAdv_img19.jpg)
|
||||
|
||||
## Resizing support
|
||||
|
||||
MessageBoxAdv allows you to adjust the size of the control at run time by dragging the gripper at bottom right. It can be achieved by using the [CanResize](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.MessageBoxAdv.html#Syncfusion_Windows_Forms_MessageBoxAdv_CanResize) property.Its default value is false.
|
||||
|
||||
{% tabs %}
|
||||
|
||||
{% highlight C# %}
|
||||
|
||||
MessageBoxAdv.CanResize = true;
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
{% highlight VB %}
|
||||
|
||||
MessageBoxAdv.CanResize = True
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
{% endtabs %}
|
||||
|
||||
![Resizing support](MessageBoxAdv_images/MessageBoxAdv_img34.png)
|
||||
|
||||
You can download the sample from [here](https://github.com/SyncfusionExamples/Messageboxadv-resize-support-in-Winforms)
|
После Ширина: | Высота: | Размер: 14 KiB |
|
@ -7,7 +7,7 @@ control: MessageBoxAdv
|
|||
documentation: ug
|
||||
---
|
||||
|
||||
# Overview
|
||||
# Windows Forms MessageBox (MessageBoxAdv) Overview
|
||||
|
||||
The [MessageBoxAdv](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.MessageBoxAdv.html) is an advanced MessageBox control that can be used to display a message to the end-user. It provides icons, buttons support and complete customization option for the control.
|
||||
|
||||
|
@ -22,4 +22,4 @@ The [MessageBoxAdv](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windo
|
|||
* **Visual Styles** - Provides rich set of VisualStyle to customize the look and feel of MessageBoxAdv.
|
||||
* **Icons** - Supports to display wide variety of built-in icons and also empowered with loading custom icons.
|
||||
* **Right-to-left support** - Supports to align all the control elements in right-to-left layout.
|
||||
|
||||
* **Resizing support** - Supports to adjust the size of the control at run time.
|
||||
|
|
|
@ -69,7 +69,7 @@ No</td><td>
|
|||
No</td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
Drop-Down Close by Click</td><td>
|
||||
Drop-Down Close by clicking</td><td>
|
||||
Yes:1</td><td>
|
||||
Yes:2</td><td>
|
||||
Yes:3</td><td>
|
||||
|
|
|
@ -288,7 +288,7 @@ Apart from the Standard styles, you can create custom base styles for nodes, col
|
|||
|
||||
For creating base styles follow the below steps,
|
||||
|
||||
1. Open the Base Style Collection Editor by click the BaseStyles property in property window.
|
||||
1. Open the Base Style Collection Editor by clicking the BaseStyles property in property window.
|
||||
|
||||
![](Appearance_Images/Appearance_img7.jpg)
|
||||
|
||||
|
|
После Ширина: | Высота: | Размер: 12 KiB |
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
title: Essential Studio for Windows Forms 2021 volume 1 Main Release Notes
|
||||
description: Essential Studio for Windows Forms 2021 volume 1 Main Release Notes
|
||||
platform: windowsforms
|
||||
documentation: ug
|
||||
---
|
||||
|
||||
# Essential Studio for Windows Forms Release Notes
|
||||
|
||||
{% include release-info.html date="March 30, 2021" version="v19.1.0.54" %}
|
||||
|
||||
|
||||
{% directory path: _includes/release-notes/v19.1.0.54 %}
|
||||
|
||||
{% include {{file.url}} %}
|
||||
|
||||
{% enddirectory %}
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
layout: post
|
||||
title: Appearance | WindowsForms | Syncfusion
|
||||
description: appearance
|
||||
description: This topic showcases various visual styles and the customizations available in Syncfusion Windows Forms RibbonControlAdv.
|
||||
platform: WindowsForms
|
||||
control: RibbonControlAdv
|
||||
documentation: ug
|
||||
---
|
||||
|
||||
# Appearance
|
||||
# Appearance in Windows Forms Ribbon
|
||||
|
||||
The Ribbon control ships with several built-in themes such as Office2007, Office2010, Office2013, TouchStyle and Office2016.
|
||||
All these themes can be applied with the ribbon property `RibbonStyle`.
|
||||
|
@ -36,23 +36,23 @@ Me.ribbonControlAdv1.RibbonStyle = RibbonStyle.Office2016
|
|||
|
||||
* Office 2016 Style
|
||||
|
||||
![](Appearance_Images/Appearance_img1.jpg)
|
||||
![Office 2016 style](Appearance_Images/Appearance_img1.jpg)
|
||||
|
||||
* Touch Style
|
||||
|
||||
![](Appearance_Images/Appearance_img2.jpg)
|
||||
![Touch style](Appearance_Images/Appearance_img2.jpg)
|
||||
|
||||
* Office 2013 Style
|
||||
|
||||
![](Appearance_Images/Appearance_img3.jpg)
|
||||
![Office 2013 Style](Appearance_Images/Appearance_img3.jpg)
|
||||
|
||||
* Office 2010 Style
|
||||
|
||||
![](Appearance_Images/Appearance_img4.jpg)
|
||||
![Office 2010 Style](Appearance_Images/Appearance_img4.jpg)
|
||||
|
||||
* Office 2007 Style
|
||||
|
||||
![](Appearance_Images/Appearance_img5.jpg)
|
||||
![Office 2007 Style](Appearance_Images/Appearance_img5.jpg)
|
||||
|
||||
## Style through SkinManager
|
||||
|
||||
|
@ -99,7 +99,7 @@ The RibbonControlAdv includes new color schemes as available in the Office 2016
|
|||
* DarkGray
|
||||
* Black
|
||||
|
||||
![](Appearance_Images/Appearance_img6.jpg)
|
||||
![Various Office 2016 Color Schemes](Appearance_Images/Appearance_img6.jpg)
|
||||
|
||||
The following code sample illustrates how to set the Colorful theme for the Office 2016 style RibbonControlAdv.
|
||||
|
||||
|
@ -131,7 +131,7 @@ Office 2013 theme now supports three color schemes:
|
|||
* DarkGray
|
||||
* Managed
|
||||
|
||||
![](Appearance_Images/Appearance_img7.jpg)
|
||||
![Various Office 2013 Color Schemes](Appearance_Images/Appearance_img7.jpg)
|
||||
|
||||
The following code sample illustrates how to set the scheme for the Office 2013 style RibbonControlAdv.
|
||||
|
||||
|
@ -164,7 +164,7 @@ The Ribbon Control Adv has come up with the same visual style of Office 2007. Th
|
|||
|
||||
It can be set through the `OfficeColorScheme` property of the RibbonControlAdv class.
|
||||
|
||||
![](Appearance_Images/Appearance_img8.jpg)
|
||||
![Various Office 2007 Color Schemes](Appearance_Images/Appearance_img8.jpg)
|
||||
|
||||
{% tabs %}
|
||||
|
||||
|
@ -211,7 +211,7 @@ Office12ColorTable.ApplyManagedColors(Me, Color.Red)
|
|||
|
||||
{% endtabs %}
|
||||
|
||||
![](Appearance_Images/Appearance_img9.jpg)
|
||||
![Custom Color Schemes](Appearance_Images/Appearance_img9.jpg)
|
||||
|
||||
## Color Table
|
||||
|
||||
|
@ -223,11 +223,11 @@ RibbonControlAdv can now be fully customized in Office2016 style under Colorful
|
|||
|
||||
In the property window of the Ribbon, click the Office2016ColorTable property. The following window will be shown
|
||||
|
||||
![](Appearance_Images/Appearance_img10.jpg)
|
||||
![Office 2016 Color Table Editor](Appearance_Images/Appearance_img10.jpg)
|
||||
|
||||
Click Add button to customize the RibbonControlAdv with the Office2016ColorTable property.
|
||||
|
||||
![](Appearance_Images/Appearance_img11.jpg)
|
||||
![Adding Office 2016 Color Table](Appearance_Images/Appearance_img11.jpg)
|
||||
|
||||
To achieve the above customization through code behind
|
||||
|
||||
|
@ -260,6 +260,12 @@ color.BackStageItemSelectionColor = Color.FromArgb(62, 109, 181);
|
|||
// To set the BackStageButton ForeColor
|
||||
color.BackStageItemForeColor = Color.White;
|
||||
|
||||
// To set the hover fore color for BackStage items.
|
||||
color.BackStageItemHoverForeColor = Color.White;
|
||||
|
||||
// To set the selection fore color for BackStage items.
|
||||
color.BackStageItemSelectionForeColor = Color.White;
|
||||
|
||||
// To set the Backstage title fore color
|
||||
color.BackStageTitleColor = ColorTranslator.FromHtml("#3a3a3a");
|
||||
|
||||
|
@ -418,6 +424,10 @@ this.ribbonControlAdv1.Office2016ColorTable.Add(color);
|
|||
|
||||
color.BackStageItemForeColor = Color.White
|
||||
|
||||
color.BackStageItemHoverForeColor = Color.White
|
||||
|
||||
color.BackStageItemSelectionForeColor = Color.White
|
||||
|
||||
color.BackStageTitleColor = ColorTranslator.FromHtml("#3a3a3a")
|
||||
|
||||
color.BackStageSystemButtonBackground = ColorTranslator.FromHtml("#c5c5c5")
|
||||
|
@ -500,7 +510,7 @@ this.ribbonControlAdv1.Office2016ColorTable.Add(color);
|
|||
|
||||
{% endtabs %}
|
||||
|
||||
![](Appearance_Images/Appearance_img12.jpg)
|
||||
![Ribbon customized wth Office2016ColorTable](Appearance_Images/Appearance_img12.jpg)
|
||||
|
||||
**Offcie2013 Style Color Table**
|
||||
|
||||
|
@ -693,7 +703,7 @@ Dim color As Office2013ColorTable = New Office2013ColorTable()
|
|||
|
||||
{% endtabs %}
|
||||
|
||||
![](Appearance_Images/Appearance_img13.jpg)
|
||||
![Ribbon customized wth Office2013ColorTable](Appearance_Images/Appearance_img13.jpg)
|
||||
|
||||
**Touch Style Color Table**
|
||||
|
||||
|
@ -899,6 +909,14 @@ _touchColorTable.ToolStripSpliterColor = Color.Red;
|
|||
|
||||
_touchColorTable.ToolstripTabItemForeColor = Color.White;
|
||||
|
||||
// To set the hover fore color for BackStage items.
|
||||
|
||||
_touchColorTable.BackStageItemHoverForeColor = Color.White;
|
||||
|
||||
// To set the selection fore color for BackStage items.
|
||||
|
||||
_touchColorTable.BackStageItemSelectionForeColor = Color.White;
|
||||
|
||||
//To apply TouchStyleColorTable for RibbonControlAdv
|
||||
|
||||
this.ribbonControlAdv1.ApplyTouchStyleColorTable(_touchColorTable);
|
||||
|
@ -1005,13 +1023,21 @@ this.ribbonControlAdv1.ApplyTouchStyleColorTable(_touchColorTable);
|
|||
|
||||
_touchColorTable.ToolstripTabItemForeColor = Color.White
|
||||
|
||||
// To set the hover fore color for BackStage items.
|
||||
|
||||
_touchColorTable.BackStageItemHoverForeColor = Color.White
|
||||
|
||||
// To set the selection fore color for BackStage items.
|
||||
|
||||
_touchColorTable.BackStageItemSelectionForeColor = Color.White
|
||||
|
||||
Me.ribbonControlAdv1.ApplyTouchStyleColorTable(_touchColorTable)
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
{% endtabs %}
|
||||
|
||||
![](Appearance_Images/Appearance_img14.jpg)
|
||||
![Ribbon customized wth TouchStyleColorTable](Appearance_Images/Appearance_img14.jpg)
|
||||
|
||||
## EnableHighContrastTheme
|
||||
|
||||
|
|
Двоичные данные
WindowsForms/Ribbon/Appearance_Images/Appearance_img6.jpg
До Ширина: | Высота: | Размер: 217 KiB После Ширина: | Высота: | Размер: 99 KiB |
Двоичные данные
WindowsForms/Ribbon/Appearance_Images/Appearance_img7.jpg
До Ширина: | Высота: | Размер: 168 KiB После Ширина: | Высота: | Размер: 85 KiB |
Двоичные данные
WindowsForms/Ribbon/Appearance_Images/Appearance_img8.jpg
До Ширина: | Высота: | Размер: 166 KiB После Ширина: | Высота: | Размер: 79 KiB |
После Ширина: | Высота: | Размер: 25 KiB |
Двоичные данные
WindowsForms/Ribbon/BackStage_Images/Backstage_img3.jpg
До Ширина: | Высота: | Размер: 199 KiB После Ширина: | Высота: | Размер: 83 KiB |
Двоичные данные
WindowsForms/Ribbon/BackStage_Images/Backstage_img9.jpg
До Ширина: | Высота: | Размер: 216 KiB После Ширина: | Высота: | Размер: 87 KiB |
|
@ -1,43 +1,43 @@
|
|||
---
|
||||
layout: post
|
||||
title: Backstage | WindowsForms | Syncfusion
|
||||
description: backstage
|
||||
description: This section briefly describes the basic functions of BackStage in RibbonControlAdv for Windows Forms.
|
||||
platform: WindowsForms
|
||||
control: RibbonControlAdv
|
||||
documentation: ug
|
||||
---
|
||||
|
||||
# Backstage
|
||||
# BackStage settings in Ribbon
|
||||
|
||||
The Ribbon Backstage will appear when the user clicks on Menu button, it allows to make actions for the whole document such as Save, Save As and print. It can be used to show the recent changes in the document and even closing the application.
|
||||
|
||||
Backstage structure will have two areas, left side which contain all the items in backstage panel and the right side which shows content of the BackstageTab.
|
||||
|
||||
There are three items that can be used in Backtage. They are
|
||||
There are three items that can be used in BackStage. They are
|
||||
|
||||
* BackStage Button – A clickable item which acts as a simple button.
|
||||
* BackStageTab – A simple tab, as you click on it, displays its content.
|
||||
* BackStageSeparator – A simple line which separates neighboring items and can be used to differentiate different set of items to improve readability.
|
||||
|
||||
![](BackStage_Images/Backstage_img1.jpg)
|
||||
![BackStage image](BackStage_Images/Backstage_img1.jpg)
|
||||
|
||||
## Open BackStage
|
||||
|
||||
In designer backstage can be opened by using smart tag of the backstage control below the designer and select `ShowBackstage`.
|
||||
|
||||
![](BackStage_Images/Backstage_img2.jpg)
|
||||
![ShowBackStage image](BackStage_Images/Backstage_img2.jpg)
|
||||
|
||||
Or backstage can be accessed by going into BackStage property grid and changing `IsVisible` as true.
|
||||
|
||||
In run time BackStage can be opened by right clicking on the `MenuButton`.
|
||||
|
||||
![](BackStage_Images/Backstage_img3.jpg)
|
||||
![MenuButton image](BackStage_Images/Backstage_img3.jpg)
|
||||
|
||||
## Create BackStage Button
|
||||
|
||||
BackStage Button can be added through Smart tag of backstage view and it can be customized using property grid of that button.
|
||||
|
||||
![](BackStage_Images/Backstage_img4.jpg)
|
||||
![BackStage button image](BackStage_Images/Backstage_img4.jpg)
|
||||
|
||||
Through coding
|
||||
|
||||
|
@ -91,7 +91,7 @@ Me.backStage1.Controls.Add(exitBackStageButton)
|
|||
|
||||
BackStage Tab can be added through smart tag of backstage view and it can be customized using the property grid.
|
||||
|
||||
![](BackStage_Images/Backstage_img5.jpg)
|
||||
![BackStage tab image](BackStage_Images/Backstage_img5.jpg)
|
||||
|
||||
Through coding
|
||||
|
||||
|
@ -153,19 +153,19 @@ Me.backStage1.Controls.Add(printBackStageTab)
|
|||
|
||||
{% endtabs %}
|
||||
|
||||
![](BackStage_Images/Backstage_img6.jpg)
|
||||
![BackStage with items](BackStage_Images/Backstage_img6.jpg)
|
||||
|
||||
### Adding Controls into BackStageTab
|
||||
|
||||
If backstage view is visible on the designer, select the tab and on left side empty space is available to add the controls for that tab, you can add the controls in that area from toolbox.
|
||||
|
||||
![](BackStage_Images/Backstage_img7.jpg)
|
||||
![Controls with BackStageTab](BackStage_Images/Backstage_img7.jpg)
|
||||
|
||||
## Add Separator
|
||||
|
||||
Separator can be added through Smart tag as explained in adding backstage button and tab.
|
||||
|
||||
![](BackStage_Images/Backstage_img8.jpg)
|
||||
![BackStage Separator image](BackStage_Images/Backstage_img8.jpg)
|
||||
|
||||
## Add Header Image
|
||||
|
||||
|
@ -187,9 +187,9 @@ Me.ribbonControlAdv1.RibbonHeaderImage = RibbonHeaderImage.Lines
|
|||
|
||||
{% endtabs %}
|
||||
|
||||
![](BackStage_Images/Backstage_img9.jpg)
|
||||
![Header image with Ribbon](BackStage_Images/Backstage_img9.jpg)
|
||||
|
||||
![](BackStage_Images/Backstage_img10.jpg)
|
||||
![Header image with BackStage](BackStage_Images/Backstage_img10.jpg)
|
||||
|
||||
To set custom image to the Ribbon header, set an image to the property `CustomRibbonHeaderImage`.
|
||||
|
||||
|
@ -259,7 +259,7 @@ Me.ribbonControlAdv1.MenuButtonEnabled = False
|
|||
|
||||
The file tab located at left end of the ribbon is the menu button, it is used to open backstage at run time.
|
||||
|
||||
![](BackStage_Images/Backstage_img11.jpg)
|
||||
![MenuButton image](BackStage_Images/Backstage_img11.jpg)
|
||||
|
||||
### Menu Button Text
|
||||
|
||||
|
@ -320,3 +320,105 @@ Me.ribbonControlAdv1.MenuColor = Color.Red
|
|||
{% endhighlight %}
|
||||
|
||||
{% endtabs %}
|
||||
|
||||
## BackStage items placement
|
||||
|
||||
The `BackStage` items listed below can be positioned either at top or bottom by using the `Placement` property.
|
||||
|
||||
* BackStageButton
|
||||
* BackStageTab
|
||||
* BackStageSeparator
|
||||
|
||||
The following code example illustrates how to position the BackStage items either at top or bottom.
|
||||
|
||||
{% tabs %}
|
||||
|
||||
{% highlight c# %}
|
||||
|
||||
using Syncfusion.Windows.Forms.Tools;
|
||||
|
||||
public partial class Form1 : RibbonForm
|
||||
{
|
||||
private Syncfusion.Windows.Forms.Tools.RibbonControlAdv ribbonControlAdv1;
|
||||
private Syncfusion.Windows.Forms.Tools.ToolStripTabItem homeTabItem;
|
||||
private Syncfusion.Windows.Forms.Tools.ToolStripTabItem sendTabItem;
|
||||
private Syncfusion.Windows.Forms.Tools.ToolStripTabItem folderTabItem;
|
||||
private Syncfusion.Windows.Forms.Tools.ToolStripEx newToolStripEx;
|
||||
private Syncfusion.Windows.Forms.BackStageView backStageView1;
|
||||
private Syncfusion.Windows.Forms.BackStage backStage1;
|
||||
private Syncfusion.Windows.Forms.BackStageTab openExportBackStageTab;
|
||||
private Syncfusion.Windows.Forms.BackStageTab saveAttachmentsBackStageTab;
|
||||
private Syncfusion.Windows.Forms.BackStageTab openBackStageTab;
|
||||
private Syncfusion.Windows.Forms.BackStageTab officeAccountsBackStageTab;
|
||||
private Syncfusion.Windows.Forms.BackStageSeparator backStageSeparator;
|
||||
private Syncfusion.Windows.Forms.BackStageTab printBackStageTab;
|
||||
private Syncfusion.Windows.Forms.BackStageButton closeBackStageButton;
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.ribbonControlAdv1 = new Syncfusion.Windows.Forms.Tools.RibbonControlAdv();
|
||||
this.homeTabItem = new Syncfusion.Windows.Forms.Tools.ToolStripTabItem();
|
||||
this.sendTabItem = new Syncfusion.Windows.Forms.Tools.ToolStripTabItem();
|
||||
this.folderTabItem = new Syncfusion.Windows.Forms.Tools.ToolStripTabItem();
|
||||
this.newToolStripEx = new Syncfusion.Windows.Forms.Tools.ToolStripEx();
|
||||
this.backStageView1 = new Syncfusion.Windows.Forms.BackStageView(this.components);
|
||||
this.backStage1 = new Syncfusion.Windows.Forms.BackStage();
|
||||
this.openExportBackStageTab = new Syncfusion.Windows.Forms.BackStageTab();
|
||||
this.saveAttachmentsBackStageTab = new Syncfusion.Windows.Forms.BackStageTab();
|
||||
this.openBackStageTab = new Syncfusion.Windows.Forms.BackStageTab();
|
||||
this.officeAccountsBackStageTab = new Syncfusion.Windows.Forms.BackStageTab();
|
||||
this.backStageSeparator = new Syncfusion.Windows.Forms.BackStageSeparator();
|
||||
this.printBackStageTab = new Syncfusion.Windows.Forms.BackStageTab();
|
||||
this.closeBackStageButton = new Syncfusion.Windows.Forms.BackStageButton();
|
||||
|
||||
this.ribbonControlAdv1.BackStageView = this.backStageView1;
|
||||
this.ribbonControlAdv1.MenuButtonText = "File";
|
||||
this.ribbonControlAdv1.Size = new System.Drawing.Size(1036, 160);
|
||||
this.ribbonControlAdv1.RibbonStyle = RibbonStyle.Office2016;
|
||||
this.Controls.Add(ribbonControlAdv1);
|
||||
|
||||
this.homeTabItem.Text = "Home";
|
||||
this.sendTabItem.Text = "Send";
|
||||
this.folderTabItem.Text = "Folder";
|
||||
|
||||
this.ribbonControlAdv1.Header.AddMainItem(this.homeTabItem);
|
||||
this.ribbonControlAdv1.Header.AddMainItem(this.sendTabItem);
|
||||
this.ribbonControlAdv1.Header.AddMainItem(this.folderTabItem);
|
||||
|
||||
this.newToolStripEx.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
|
||||
this.homeTabItem.Panel.Controls.Add(newToolStripEx);
|
||||
|
||||
this.backStageView1.BackStage = this.backStage1;
|
||||
this.backStageView1.HostControl = null;
|
||||
this.backStageView1.HostForm = this;
|
||||
|
||||
this.openExportBackStageTab.Text = "Open/Export";
|
||||
this.saveAttachmentsBackStageTab.Text = "Save Attachments";
|
||||
this.openBackStageTab.Text = "Open";
|
||||
this.officeAccountsBackStageTab.Text = "Office Accounts";
|
||||
this.printBackStageTab.Text = "Print";
|
||||
this.closeBackStageButton.Text = "Close";
|
||||
|
||||
this.backStageSeparator.Placement = Syncfusion.Windows.Forms.BackStageItemPlacement.Bottom;
|
||||
this.printBackStageTab.Placement = Syncfusion.Windows.Forms.BackStageItemPlacement.Bottom;
|
||||
this.closeBackStageButton.Placement = Syncfusion.Windows.Forms.BackStageItemPlacement.Bottom;
|
||||
|
||||
this.backStage1.Controls.Add(openExportBackStageTab);
|
||||
this.backStage1.Controls.Add(saveAttachmentsBackStageTab);
|
||||
this.backStage1.Controls.Add(openBackStageTab);
|
||||
this.backStage1.Controls.Add(officeAccountsBackStageTab);
|
||||
this.backStage1.Controls.Add(backStageSeparator);
|
||||
this.backStage1.Controls.Add(printBackStageTab);
|
||||
this.backStage1.Controls.Add(closeBackStageButton);
|
||||
}
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
{% endtabs %}
|
||||
|
||||
![BackStage placement image](BackStage_Images/Backstage_img12.jpg)
|
||||
|
||||
N>[View sample in GitHub](https://github.com/SyncfusionExamples/How-to-customize-backstage-items-placement)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ control: RibbonControlAdv
|
|||
documentation: ug
|
||||
---
|
||||
|
||||
# Ribbon Form
|
||||
# Ribbon Form in Windows Forms
|
||||
|
||||
`RibbonForm` is an extension that replaces the default form to enable different Visual styles to the ribbon. This RibbonForm now gives similar look and feel of Microsoft office, to its controls.
|
||||
|
||||
|
@ -118,3 +118,112 @@ this.TopLeftRadius = 20;
|
|||
Me.TopLeftRadius = 20
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
## Adding user control to the title bar
|
||||
|
||||
The `RibbonForm` allows to load any user control into the right side of the title bar by using the `HeaderItem` property.
|
||||
|
||||
The following code example illustrates how to add the header item in title bar of the RibbonForm.
|
||||
|
||||
{% tabs %}
|
||||
|
||||
{% highlight c# %}
|
||||
|
||||
using Syncfusion.Windows.Forms.Tools;
|
||||
using Syncfusion.WinForms.Controls;
|
||||
|
||||
public partial class Form1 : RibbonForm
|
||||
{
|
||||
private Syncfusion.Windows.Forms.Tools.RibbonControlAdv ribbonControlAdv1;
|
||||
private Syncfusion.Windows.Forms.Tools.ToolStripTabItem homeTabItem;
|
||||
private Syncfusion.Windows.Forms.Tools.ToolStripTabItem sendTabItem;
|
||||
private Syncfusion.Windows.Forms.Tools.ToolStripTabItem folderTabItem;
|
||||
private Syncfusion.Windows.Forms.Tools.ToolStripEx newToolStripEx;
|
||||
private Syncfusion.Windows.Forms.BackStageView backStageView1;
|
||||
private Syncfusion.Windows.Forms.BackStage backStage1;
|
||||
private Syncfusion.Windows.Forms.BackStageTab openExportBackStageTab;
|
||||
private Syncfusion.Windows.Forms.BackStageTab saveAttachmentsBackStageTab;
|
||||
private Syncfusion.Windows.Forms.BackStageTab openBackStageTab;
|
||||
private Syncfusion.Windows.Forms.BackStageTab officeAccountsBackStageTab;
|
||||
private Syncfusion.Windows.Forms.BackStageSeparator backStageSeparator;
|
||||
private Syncfusion.Windows.Forms.BackStageTab printBackStageTab;
|
||||
private Syncfusion.Windows.Forms.BackStageButton closeBackStageButton;
|
||||
private Syncfusion.WinForms.Controls.SfButton button;
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.ribbonControlAdv1 = new Syncfusion.Windows.Forms.Tools.RibbonControlAdv();
|
||||
this.homeTabItem = new Syncfusion.Windows.Forms.Tools.ToolStripTabItem();
|
||||
this.sendTabItem = new Syncfusion.Windows.Forms.Tools.ToolStripTabItem();
|
||||
this.folderTabItem = new Syncfusion.Windows.Forms.Tools.ToolStripTabItem();
|
||||
this.newToolStripEx = new Syncfusion.Windows.Forms.Tools.ToolStripEx();
|
||||
this.backStageView1 = new Syncfusion.Windows.Forms.BackStageView(this.components);
|
||||
this.backStage1 = new Syncfusion.Windows.Forms.BackStage();
|
||||
this.openExportBackStageTab = new Syncfusion.Windows.Forms.BackStageTab();
|
||||
this.saveAttachmentsBackStageTab = new Syncfusion.Windows.Forms.BackStageTab();
|
||||
this.openBackStageTab = new Syncfusion.Windows.Forms.BackStageTab();
|
||||
this.officeAccountsBackStageTab = new Syncfusion.Windows.Forms.BackStageTab();
|
||||
this.backStageSeparator = new Syncfusion.Windows.Forms.BackStageSeparator();
|
||||
this.printBackStageTab = new Syncfusion.Windows.Forms.BackStageTab();
|
||||
this.closeBackStageButton = new Syncfusion.Windows.Forms.BackStageButton();
|
||||
|
||||
this.ribbonControlAdv1.BackStageView = this.backStageView1;
|
||||
this.ribbonControlAdv1.MenuButtonText = "File";
|
||||
this.ribbonControlAdv1.Size = new System.Drawing.Size(1036, 160);
|
||||
this.ribbonControlAdv1.RibbonStyle = RibbonStyle.Office2016;
|
||||
this.Controls.Add(ribbonControlAdv1);
|
||||
|
||||
this.homeTabItem.Text = "Home";
|
||||
this.sendTabItem.Text = "Send";
|
||||
this.folderTabItem.Text = "Folder";
|
||||
|
||||
this.ribbonControlAdv1.Header.AddMainItem(this.homeTabItem);
|
||||
this.ribbonControlAdv1.Header.AddMainItem(this.sendTabItem);
|
||||
this.ribbonControlAdv1.Header.AddMainItem(this.folderTabItem);
|
||||
|
||||
this.newToolStripEx.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
|
||||
this.homeTabItem.Panel.Controls.Add(newToolStripEx);
|
||||
|
||||
this.button = new SfButton();
|
||||
this.button.ForeColor = Color.White;
|
||||
this.button.Font = Font = new System.Drawing.Font("Segoe UI Semibold", 9F);
|
||||
this.button.Size = new System.Drawing.Size(75, 50);
|
||||
this.button.Text = "Sign-In";
|
||||
this.button.Style.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(120)))), ((int)(((byte)(212)))));
|
||||
this.button.Style.HoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(141)))), ((int)(((byte)(212)))));
|
||||
this.button.Style.FocusedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(87)))), ((int)(((byte)(154)))));
|
||||
this.button.Style.PressedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(87)))), ((int)(((byte)(154)))));
|
||||
this.button.Style.PressedForeColor = Color.White;
|
||||
this.button.Style.HoverForeColor = Color.White;
|
||||
this.button.Style.FocusedForeColor = Color.White;
|
||||
this.HeaderItem = button;
|
||||
|
||||
this.backStageView1.BackStage = this.backStage1;
|
||||
this.backStageView1.HostControl = null;
|
||||
this.backStageView1.HostForm = this;
|
||||
|
||||
this.openExportBackStageTab.Text = "Open/Export";
|
||||
this.saveAttachmentsBackStageTab.Text = "Save Attachments";
|
||||
this.openBackStageTab.Text = "Open";
|
||||
this.officeAccountsBackStageTab.Text = "Office Accounts";
|
||||
this.printBackStageTab.Text = "Print";
|
||||
this.closeBackStageButton.Text = "Close";
|
||||
|
||||
this.backStage1.Controls.Add(openExportBackStageTab);
|
||||
this.backStage1.Controls.Add(saveAttachmentsBackStageTab);
|
||||
this.backStage1.Controls.Add(openBackStageTab);
|
||||
this.backStage1.Controls.Add(officeAccountsBackStageTab);
|
||||
this.backStage1.Controls.Add(backStageSeparator);
|
||||
this.backStage1.Controls.Add(printBackStageTab);
|
||||
this.backStage1.Controls.Add(closeBackStageButton);
|
||||
}
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
{% endtabs %}
|
||||
|
||||
![HeaderItem image](Ribbon_Form_Images/Ribbon-Form_img3.jpg)
|
||||
|
||||
N>[View sample in GitHub](https://github.com/SyncfusionExamples/How-to-load-user-control-to-titlebar-of-RibbonForm)
|
После Ширина: | Высота: | Размер: 21 KiB |
Двоичные данные
WindowsForms/chart/FAQ/How-to-add-image-on-chart-area/How-to-add-image-on-chart-area.png
Normal file
После Ширина: | Высота: | Размер: 17 KiB |
|
@ -229,7 +229,7 @@ It defines the style for the Nodes. BaseStylePairs property is a collection prop
|
|||
|
||||
Apart from the Standard style, we can also create custom Base styles using the following steps in Base Styles Collection Editor
|
||||
|
||||
1. Open the Base Style Collection Editor by click the BaseStyles property in property window.
|
||||
1. Open the Base Style Collection Editor by clicking the BaseStyles property in property window.
|
||||
|
||||
2. Clicking the Add Base Style button, will add a new BaseStyle whose properties can be edited.
|
||||
|
||||
|
|