Articles in this section

How to handle the LauncherClick event in WPF Ribbon control?

In the WPF Ribbon control, the LauncherButton is located at the bottom-right corner of the RibbonBar. You can manage this button using the LauncherClick event. It is typically used to control the items within the RibbonBar. It also demonstrates how to open a pop-up window when the LauncherButton is clicked.


Define RibbonBar in XAML


Add a RibbonBar in XAML and attach the LauncherClick event handler.

XAML

<syncfusion:Ribbon x:Name="_ribbon" VerticalAlignment="Top">
     <syncfusion:RibbonTab Caption="HOME"  IsChecked="True">
         <syncfusion:RibbonBar Name="New" Width="90" Header="New" LauncherClick="Clipboard_LauncherClick"/>
         <syncfusion:RibbonBar Name="Delete" Width="150" Header="Delete"/>
         <syncfusion:RibbonBar Name="Respond" Width="90" Header="Respond"/>
         <syncfusion:RibbonBar Name="Quicksteps" Width="90" Header="Quick Steps"/>
         <syncfusion:RibbonBar Name="Find" Width="90" Header="Find"/>
     </syncfusion:RibbonTab>
     <syncfusion:RibbonTab Caption="SEND/RCEIVE"  IsChecked="False"/>
     <syncfusion:RibbonTab Caption="FOLDER"  IsChecked="False"/>
     <syncfusion:RibbonTab Caption="VIEW"  IsChecked="False"/>
 </syncfusion:Ribbon>
Create the Pop-up Window


Create a new Window that will serve as the pop-up. For example, create a new XAML file name
PopupWindow.xaml.


XAML

<Window x:Class="Launcher_Click_Ribbon.PopupWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Launcher_Click_Ribbon"
        mc:Ignorable="d"
        Title="PopupWindow" Height="450" Width="800">
    <Grid>
        <TextBlock Text="This is a pop-up window!" HorizontalAlignment="Center" VerticalAlignment="Center"/>
    </Grid>
</Window>

Handle the LauncherClick event in the Code-Behind

public MainWindow()
{
    InitializeComponent();
}

private void Clipboard_LauncherClick(object sender, RoutedEventArgs e)
{
    PopupWindow popupWindow = new PopupWindow();

    // Show the pop-up window as a dialog
    popupWindow.ShowDialog();
}

Output

Recording 2025-01-30 124432

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied