|
2 | 2 | layout: post |
3 | 3 | title: Backstage in WPF Ribbon control | Syncfusion® |
4 | 4 | description: Learn about Backstage support in Syncfusion® Essential Studio® WPF Ribbon control, its elements and more. |
5 | | -platform: WPF |
| 5 | +platform: wpf |
6 | 6 | control: Ribbon |
7 | 7 | documentation: ug |
8 | 8 | --- |
@@ -101,7 +101,7 @@ syncfusionskin:SfSkinManager.VisualStyle="Office2013White" > |
101 | 101 |
|
102 | 102 | {% endtabs %} |
103 | 103 |
|
104 | | - |
| 104 | + |
105 | 105 |
|
106 | 106 | ### Customize the BackStage Visibility |
107 | 107 |
|
@@ -285,7 +285,7 @@ syncfusionskin:SfSkinManager.VisualStyle="Office2013White" > |
285 | 285 |
|
286 | 286 | {% endtabs %} |
287 | 287 |
|
288 | | - |
| 288 | + |
289 | 289 |
|
290 | 290 | ## Setting image to BackStageCommandButton |
291 | 291 |
|
@@ -419,7 +419,7 @@ The [`IconTemplate`](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Tools |
419 | 419 |
|
420 | 420 | {% endtabs %} |
421 | 421 |
|
422 | | -  |
| 422 | +  |
423 | 423 |
|
424 | 424 | N> [View sample in GitHub](https://github.com/SyncfusionExamples/syncfusion-wpf-ribbon-examples/tree/main/Samples/Setting-icons-using-IconTemplate) |
425 | 425 |
|
@@ -493,7 +493,7 @@ The [`IconTemplate`](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Tools |
493 | 493 |
|
494 | 494 | {% endtabs %} |
495 | 495 |
|
496 | | -  |
| 496 | +  |
497 | 497 |
|
498 | 498 | ### Setting vector image |
499 | 499 |
|
@@ -598,7 +598,7 @@ The [`IconTemplate`](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Tools |
598 | 598 | {% endtabs %} |
599 | 599 |
|
600 | 600 |
|
601 | | -  |
| 601 | +  |
602 | 602 |
|
603 | 603 | ## Add BackStageTabItem |
604 | 604 |
|
@@ -704,7 +704,7 @@ syncfusionskin:SfSkinManager.VisualStyle="Office2013White" > |
704 | 704 |
|
705 | 705 | {% endtabs %} |
706 | 706 |
|
707 | | - |
| 707 | + |
708 | 708 |
|
709 | 709 | ## Add BackStage separator |
710 | 710 |
|
@@ -811,7 +811,7 @@ syncfusionskin:SfSkinManager.VisualStyle="Office2013White" > |
811 | 811 |
|
812 | 812 | {% endtabs %} |
813 | 813 |
|
814 | | - |
| 814 | + |
815 | 815 |
|
816 | 816 | ## BackStage items position |
817 | 817 |
|
@@ -926,7 +926,7 @@ syncfusionskin:SfSkinManager.VisualStyle="Office2019Colorful" Width="820" Height |
926 | 926 |
|
927 | 927 | {% endtabs %} |
928 | 928 |
|
929 | | - |
| 929 | + |
930 | 930 |
|
931 | 931 | N> [View sample in GitHub](https://github.com/SyncfusionExamples/syncfusion-wpf-ribbon-examples/tree/main/Samples/Positioning-BackStageItems) |
932 | 932 |
|
@@ -1236,7 +1236,7 @@ When the [`PlacementType`](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows |
1236 | 1236 |
|
1237 | 1237 | {% endtabs %} |
1238 | 1238 |
|
1239 | | - |
| 1239 | + |
1240 | 1240 |
|
1241 | 1241 | #### Backstage placed in MS Window |
1242 | 1242 |
|
@@ -1450,7 +1450,7 @@ When the [`PlacementType`](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows |
1450 | 1450 |
|
1451 | 1451 | {% endtabs %} |
1452 | 1452 |
|
1453 | | - |
| 1453 | + |
1454 | 1454 |
|
1455 | 1455 | #### Backstage placed in Placement target |
1456 | 1456 |
|
@@ -1670,7 +1670,7 @@ When the [`PlacementType`](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows |
1670 | 1670 |
|
1671 | 1671 | {% endtabs %} |
1672 | 1672 |
|
1673 | | - |
| 1673 | + |
1674 | 1674 |
|
1675 | 1675 | ### Place the backstage in BelowTab |
1676 | 1676 |
|
@@ -1886,7 +1886,7 @@ When the [`PlacementType`](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows |
1886 | 1886 |
|
1887 | 1887 | {% endtabs %} |
1888 | 1888 |
|
1889 | | - |
| 1889 | + |
1890 | 1890 |
|
1891 | 1891 | #### Backstage placed in MS Window |
1892 | 1892 |
|
@@ -2100,7 +2100,7 @@ When the [`PlacementType`](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows |
2100 | 2100 |
|
2101 | 2101 | {% endtabs %} |
2102 | 2102 |
|
2103 | | - |
| 2103 | + |
2104 | 2104 |
|
2105 | 2105 | #### Backstage placed in Placement target |
2106 | 2106 |
|
@@ -2320,11 +2320,170 @@ When the [`PlacementType`](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows |
2320 | 2320 |
|
2321 | 2321 | {% endtabs %} |
2322 | 2322 |
|
2323 | | - |
| 2323 | + |
2324 | 2324 |
|
2325 | 2325 | N> View [sample](https://github.com/SyncfusionExamples/How-to-set-placement-type-and-placement-target-for-Backstage) in GitHub. |
2326 | 2326 |
|
2327 | | -## Customize the BackStageButton visibility |
| 2327 | +## Customization of BackStageButton |
| 2328 | + |
| 2329 | +The BackStage button in Ribbon can be customized to change its header text, apply a custom header template, or control its visibility. |
| 2330 | + |
| 2331 | +### BackStageHeader |
| 2332 | + |
| 2333 | +The `BackStageHeader` property allows you to set the header text for the Backstage button in the Ribbon. By default, this header is displayed as File in plain text. |
| 2334 | + |
| 2335 | +{% tabs %} |
| 2336 | + |
| 2337 | +{% highlight XAML %} |
| 2338 | + |
| 2339 | +<syncfusion:RibbonWindow x:Class="IconSupport_BackStageButton.MainWindow" |
| 2340 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 2341 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 2342 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 2343 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 2344 | + xmlns:local="clr-namespace:IconSupport_BackStageButton" |
| 2345 | + mc:Ignorable="d" |
| 2346 | + xmlns:syncfusion="http://schemas.syncfusion.com/wpf" |
| 2347 | + syncfusion:SfSkinManager.VisualStyle="Windows11Light" |
| 2348 | + Title="MainWindow" Height="450" Width="800" |
| 2349 | + WindowStartupLocation="CenterScreen"> |
| 2350 | + <Grid> |
| 2351 | + <syncfusion:Ribbon x:Name="_ribbon" VerticalAlignment="Top" BackStageHeader="App"> |
| 2352 | + <syncfusion:RibbonTab Caption="HOME" IsChecked="True"> |
| 2353 | + <syncfusion:RibbonBar Name="New" Width="120" Header="New"> |
| 2354 | + <syncfusion:RibbonButton SizeForm="Large" Label="New Email"/> |
| 2355 | + <syncfusion:DropDownButton SizeForm="Large" Label="New Items"> |
| 2356 | + <syncfusion:DropDownMenuItem Header="E-mail Message"/> |
| 2357 | + <syncfusion:DropDownMenuItem Header="Appointment"/> |
| 2358 | + <syncfusion:DropDownMenuItem Header="Meeting"/> |
| 2359 | + <syncfusion:DropDownMenuItem Header="Contact"/> |
| 2360 | + <syncfusion:DropDownMenuItem Header="Task"/> |
| 2361 | + </syncfusion:DropDownButton> |
| 2362 | + </syncfusion:RibbonBar> |
| 2363 | + <syncfusion:RibbonBar Name="Delete" Width="130" Header="Delete"> |
| 2364 | + <syncfusion:RibbonButton Label="Ignore"/> |
| 2365 | + <syncfusion:RibbonButton Label="Delete" SizeForm="Large"/> |
| 2366 | + </syncfusion:RibbonBar> |
| 2367 | + <syncfusion:RibbonBar Name="Respond" Width="200" Header="Respond"> |
| 2368 | + <syncfusion:RibbonButton Label="Reply" SizeForm="Large"/> |
| 2369 | + <syncfusion:RibbonButton Label="Reply All" SizeForm="Large"/> |
| 2370 | + <syncfusion:RibbonButton Label="Forward" SizeForm="Large"/> |
| 2371 | + <syncfusion:RibbonButton Label="Meeting"/> |
| 2372 | + </syncfusion:RibbonBar> |
| 2373 | + <syncfusion:RibbonBar Name="Quicksteps" Width="90" Header="Quick Steps"/> |
| 2374 | + <syncfusion:RibbonBar Name="Find" Width="90" Header="Find"/> |
| 2375 | + </syncfusion:RibbonTab> |
| 2376 | + <syncfusion:RibbonTab Caption="SEND/RCEIVE" IsChecked="False"/> |
| 2377 | + <syncfusion:RibbonTab Caption="FOLDER" IsChecked="False"/> |
| 2378 | + <syncfusion:RibbonTab Caption="VIEW" IsChecked="False"/> |
| 2379 | + </syncfusion:Ribbon> |
| 2380 | + </Grid> |
| 2381 | +</syncfusion:RibbonWindow> |
| 2382 | + |
| 2383 | +{% endhighlight %} |
| 2384 | + |
| 2385 | +{% tabs %} |
| 2386 | + |
| 2387 | + |
| 2388 | + |
| 2389 | +### BackstageHeaderTemplate |
| 2390 | + |
| 2391 | +The `BackStageHeaderTemplate` property allows you to customize the Backstage header by applying a DataTemplate. This enables you to define a custom layout, such as adding an icon and text. |
| 2392 | + |
| 2393 | +The following code example illustrates how to customize the Backstage header. |
| 2394 | + |
| 2395 | +{% endtabs %} |
| 2396 | + |
| 2397 | +{% highlight XAML %} |
| 2398 | + |
| 2399 | +<syncfusion:RibbonWindow x:Class="IconSupport_BackStageButton.MainWindow" |
| 2400 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 2401 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 2402 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 2403 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 2404 | + xmlns:local="clr-namespace:IconSupport_BackStageButton" |
| 2405 | + mc:Ignorable="d" |
| 2406 | + xmlns:syncfusion="http://schemas.syncfusion.com/wpf" |
| 2407 | + syncfusion:SfSkinManager.VisualStyle="Windows11Light" |
| 2408 | + Title="MainWindow" Height="450" Width="800" |
| 2409 | + WindowStartupLocation="CenterScreen"> |
| 2410 | + <syncfusion:RibbonWindow.Resources> |
| 2411 | + <DataTemplate x:Key="FileHeaderTemplate"> |
| 2412 | + <StackPanel Orientation="Horizontal"> |
| 2413 | + <Path |
| 2414 | + Width="15" |
| 2415 | + Height="15" |
| 2416 | + Margin="0,0,0,0" |
| 2417 | + Data="M21,7.9999917L21,27.000005C21,28.103001,20.103027,29.000005,19,29.000005L8,29.000005 8,29.999991 22,29.999991 22,7.9999917z |
| 2418 | + M18,5.0000043L18,24.000001C18,25.102999,17.103,26.000001,16,26.000001L5,26.000001 5,27.000005 6.0000002,27.000005 8,26.999991 |
| 2419 | + 19,27.000005 19,7.9999917 19,5.9999917 19,5.0000043z |
| 2420 | + M7,3.414L3.3819871,7.0320127 7,7.0320127z |
| 2421 | + M9,1.9999999L9,9.0320108 2.0000004,9.0320108 2.0000004,24.000001 16,24.000001 16,5.0000043 16,3.0000044 16,1.9999999z |
| 2422 | + M7.586,0L16,0C17.103,0,18,0.89700007,18,1.9999999L18,3.0000044 19,3.0000044C20.103027,3.0000045,21,3.8969772,21,5.0000043L21,5.9999917 |
| 2423 | + 22,5.9999917C23.103001,5.9999917,24,6.8969915,24,7.9999917L24,29.999991C24,31.102992,23.103001,31.999991,22,31.999991L8,31.999991 |
| 2424 | + C6.8970001,31.999991,6,31.102992,6.0000002,29.999991L6.0000002,29.000005 5,29.000005C3.8969727,29.000005,3,28.103001,3.0000001,27.000005 |
| 2425 | + L3.0000001,26.000001 2.0000004,26.000001C0.89700007,26.000001,0,25.102999,0,24.000001L0,7.5860002z" |
| 2426 | + Fill="{sfskin:ThemeResource ThemeKey={sfskin:ThemeKey Key=PrimaryBackground}}" |
| 2427 | + RenderTransformOrigin="0.5,0.5" |
| 2428 | + Stretch="Uniform"> |
| 2429 | + <Path.RenderTransform> |
| 2430 | + <TransformGroup> |
| 2431 | + <TransformGroup.Children> |
| 2432 | + <RotateTransform Angle="0" /> |
| 2433 | + <ScaleTransform ScaleX="1" ScaleY="1" /> |
| 2434 | + </TransformGroup.Children> |
| 2435 | + </TransformGroup> |
| 2436 | + </Path.RenderTransform> |
| 2437 | + </Path> |
| 2438 | + <TextBlock |
| 2439 | + Text="{Binding}" |
| 2440 | + FontWeight="Bold" |
| 2441 | + Margin="4,0,0,0" |
| 2442 | + HorizontalAlignment="Center" |
| 2443 | + VerticalAlignment="Center" /> |
| 2444 | + </StackPanel> |
| 2445 | + </DataTemplate> |
| 2446 | + </syncfusion:RibbonWindow.Resources> |
| 2447 | + <Grid> |
| 2448 | + <syncfusion:Ribbon x:Name="_ribbon" VerticalAlignment="Top" BackStageHeaderTemplate="{StaticResource FileHeaderTemplate}" BackStageHeader="App"> |
| 2449 | + <syncfusion:RibbonTab Caption="HOME" IsChecked="True"> |
| 2450 | + <syncfusion:RibbonBar Name="New" Width="120" Header="New"> |
| 2451 | + <syncfusion:RibbonButton SizeForm="Large" Label="New Email"/> |
| 2452 | + <syncfusion:DropDownButton SizeForm="Large" Label="New Items"> |
| 2453 | + <syncfusion:DropDownMenuItem Header="E-mail Message"/> |
| 2454 | + <syncfusion:DropDownMenuItem Header="Appointment"/> |
| 2455 | + <syncfusion:DropDownMenuItem Header="Meeting"/> |
| 2456 | + <syncfusion:DropDownMenuItem Header="Contact"/> |
| 2457 | + <syncfusion:DropDownMenuItem Header="Task"/> |
| 2458 | + </syncfusion:DropDownButton> |
| 2459 | + </syncfusion:RibbonBar> |
| 2460 | + <syncfusion:RibbonBar Name="Delete" Width="130" Header="Delete"> |
| 2461 | + <syncfusion:RibbonButton Label="Ignore"/> |
| 2462 | + <syncfusion:RibbonButton Label="Delete" SizeForm="Large"/> |
| 2463 | + </syncfusion:RibbonBar> |
| 2464 | + <syncfusion:RibbonBar Name="Respond" Width="200" Header="Respond"> |
| 2465 | + <syncfusion:RibbonButton Label="Reply" SizeForm="Large"/> |
| 2466 | + <syncfusion:RibbonButton Label="Reply All" SizeForm="Large"/> |
| 2467 | + <syncfusion:RibbonButton Label="Forward" SizeForm="Large"/> |
| 2468 | + <syncfusion:RibbonButton Label="Meeting"/> |
| 2469 | + </syncfusion:RibbonBar> |
| 2470 | + <syncfusion:RibbonBar Name="Quicksteps" Width="90" Header="Quick Steps"/> |
| 2471 | + <syncfusion:RibbonBar Name="Find" Width="90" Header="Find"/> |
| 2472 | + </syncfusion:RibbonTab> |
| 2473 | + <syncfusion:RibbonTab Caption="SEND/RCEIVE" IsChecked="False"/> |
| 2474 | + <syncfusion:RibbonTab Caption="FOLDER" IsChecked="False"/> |
| 2475 | + <syncfusion:RibbonTab Caption="VIEW" IsChecked="False"/> |
| 2476 | + </syncfusion:Ribbon> |
| 2477 | + </Grid> |
| 2478 | +</syncfusion:RibbonWindow> |
| 2479 | + |
| 2480 | +{% endhighlight %} |
| 2481 | + |
| 2482 | +{% endtabs %} |
| 2483 | + |
| 2484 | + |
| 2485 | + |
| 2486 | +### BackStageButton visibility |
2328 | 2487 |
|
2329 | 2488 | Ribbon control allows to show or hide the `BackStageButton` by using its `Visibility` property. |
2330 | 2489 |
|
@@ -2404,5 +2563,4 @@ private void MainWindow_Loaded(object sender, RoutedEventArgs e) |
2404 | 2563 |
|
2405 | 2564 | {% endtabs %} |
2406 | 2565 |
|
2407 | | - |
2408 | | - |
| 2566 | + |
0 commit comments