Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions wpf/Tabbed-Window/tab-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,39 @@ private void OnNewTabRequested(object sender, NewTabRequestedEventArgs e)

![WPF TabbedWindow New Tab Button](tab-management_images/tabbedwindow_newbutton.gif)

## Mouse Wheel Support for Scrolling Tabs

When the tab strip contains more tabs that can be displayed, enable mouse wheel scrolling to help navigate to tab headers that are not currently visible. Set the [IsMouseWheelScrollingEnabled](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.SfTabControl.html#Syncfusion_Windows_Controls_SfTabControl_IsMouseWheelScrollingEnabled) property to `True` on the [SfTabControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.SfTabControl.html).

{% tabs %}

{% highlight XAML %}

<syncfusion:SfTabControl x:Name="tabControl"
IsMouseWheelScrollingEnabled="True"
TabArrangement="Horizontal">
<syncfusion:SfTabItem Header="Home" Content="Welcome to Home Tab" />
<syncfusion:SfTabItem Header="File" Content="Welcome to File Tab" />
<syncfusion:SfTabItem Header="Edit" Content="Welcome to Edit Tab" />
<syncfusion:SfTabItem Header="Tools" Content="Welcome to Tools Tab" />
<syncfusion:SfTabItem Header="View" Content="Welcome to View Tab" />
<syncfusion:SfTabItem Header="Help" Content="Welcome to Help Tab" />
</syncfusion:SfTabControl>

{% endhighlight %}

{% highlight C# %}

tabControl.IsMouseWheelScrollingEnabled = true;

{% endhighlight %}

{% endtabs %}

Mouse wheel scrolling moves the tab header strip horizontally, allowing users to quickly access tabs that are outside the currently visible area.

![WPF TabbedWindow mouse wheel scrolling](tab-management_images/wpf_tabbedwindow_mousewheel.gif)

## Customizing the New Tab Button

You can customize the appearance of the new tab button using the [NewTabButtonStyle](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.SfTabControl.html#Syncfusion_Windows_Controls_SfTabControl_NewTabButtonStyle) property. This allows you to modify visual properties such as background, border, width, and height.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
112 changes: 112 additions & 0 deletions wpf/Toast-Notification/Customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,118 @@ documentation: ug

This section explains how to customize toast interaction elements such as action buttons, callbacks, templates, and close button behavior.

## Grouping Toast Notifications

You can group related toast notifications by assigning the same value to the [GroupName](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.SfToastNotification.ToastOptions.html#Syncfusion_UI_Xaml_SfToastNotification_ToastOptions_GroupName) property in [ToastOptions](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.SfToastNotification.ToastOptions.html). Grouping helps organize related notifications and reduces clutter when multiple toasts are displayed.

{% tabs %}
{% highlight C# %}

SfToastNotification.Show(this, new ToastOptions
{
Mode = ToastMode.Window,
Title = "Application Status",
Header = "Review the latest application updates",
Message = "Message Area",
GroupName = "Reminders"
});

SfToastNotification.Show(this, new ToastOptions
{
Mode = ToastMode.Window,
Title = "New Features",
Header = "New features are available to explore",
GroupName = "Reminders"
});

SfToastNotification.Show(this, new ToastOptions
{
Mode = ToastMode.Window,
Placement = ToastPlacement.BottomLeft,
Title = "General Updates",
Header = "Check out the detailed update notes",
GroupName = "Alerts"
});

{% endhighlight %}
{% endtabs %}

To display a toast in a different group, specify a different group name. Toasts without a `GroupName` value are not assigned to a custom group.

![WPF toast notification group name support](Images/wpf_toast_groupid.png)

## Custom Position

The [ToastOptions](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.SfToastNotification.ToastOptions.html) class provides flexible toast positioning. Use the [Placement](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.SfToastNotification.ToastOptions.html#Syncfusion_UI_Xaml_SfToastNotification_ToastOptions_Placement) property with a built-in [ToastPlacement](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.SfToastNotification.ToastPlacement.html) value, and use `HorizontalOffset` and `VerticalOffset` to adjust the toast relative to that placement. To position a toast at exact coordinates, set `Placement` to `Custom` and specify the `X` and `Y` coordinates. Positive and negative offset values move the toast relative to its selected placement. When `Placement` is set to `Custom`, `X` and `Y` specify the toast position directly.

{% tabs %}
{% highlight C# %}

// Apply offsets to a built-in placement.
SfToastNotification.Show(this, new ToastOptions
{
Mode = ToastMode.Screen,
Placement = ToastPlacement.BottomRight,
Title = "Offset Toast",
Message = "This toast is displayed with custom offsets.",
HorizontalOffset = -50.0,
VerticalOffset = 20.0
});

// Display a toast at an exact position.
SfToastNotification.Show(this, new ToastOptions
{
Mode = ToastMode.Window,
Placement = ToastPlacement.Custom,
Title = "Custom positioned toast",
Message = "This toast is displayed at the specified coordinates.",
X = 200,
Y = 450,
PreventAutoClose = true
});

{% endhighlight %}
{% endtabs %}

![WPF toast notification custom position](Images/wpf_toast_customposition.gif)

N> Absolute coordinates disable automatic stacking so each toast remains at its defined location. Offsets with predefined placements retain the normal stacking behavior.

## Toast Distance Customization

Use the [Spacing](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.SfToastNotification.SfToastNotification.html#Syncfusion_UI_Xaml_SfToastNotification_SfToastNotification_Spacing) property to customize the vertical distance between stacked toast notifications. The spacing value is applied globally to the toasts displayed by [SfToastNotification](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.SfToastNotification.SfToastNotification.html).

{% tabs %}
{% highlight XAML %}

<TextBox Name="ToastSpacingTextBox"
Text="8"
Height="20"
Width="80"
TextAlignment="Center" />

<Button Content="Show Toasts"
Click="Button_Click" />

{% endhighlight %}

{% highlight C# %}

private void Button_Click(object sender, RoutedEventArgs e)
{
SfToastNotification.Spacing = double.Parse(ToastSpacingTextBox.Text);

SfToastNotification.Show(this, new ToastOptions
{
Mode = ToastMode.Screen
});
}

{% endhighlight %}
{% endtabs %}

![WPF toast notification distance customization](Images/wpf_toast_distance.gif)

## Action Buttons

You can add interactive action buttons to a toast notification by using the `Actions` collection. You can also use the [ShowActionButtons](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.SfToastNotification.ToastItem.html#Syncfusion_UI_Xaml_SfToastNotification_ToastItem_ShowActionButtons) property to control whether the action button row is displayed for in-app toast modes. The default value of `ShowActionButtons` is `true`.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.