AvaloniaControls.Ribbon 0.9.9

dotnet add package AvaloniaControls.Ribbon --version 0.9.9
                    
NuGet\Install-Package AvaloniaControls.Ribbon -Version 0.9.9
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AvaloniaControls.Ribbon" Version="0.9.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AvaloniaControls.Ribbon" Version="0.9.9" />
                    
Directory.Packages.props
<PackageReference Include="AvaloniaControls.Ribbon" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AvaloniaControls.Ribbon --version 0.9.9
                    
#r "nuget: AvaloniaControls.Ribbon, 0.9.9"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AvaloniaControls.Ribbon@0.9.9
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AvaloniaControls.Ribbon&version=0.9.9
                    
Install as a Cake Addin
#tool nuget:?package=AvaloniaControls.Ribbon&version=0.9.9
                    
Install as a Cake Tool

AvaloniaRibbon

This is a Ribbon Control Component library that replicates Microsoft's Ribbon UI, as seen in Windows 8+'s File Explorer, Microsoft Office 2007+, and in various other places, for Avalonia. In its present state, it is reasonably usable, but some features are still missing, so it should not considered complete.

Project Background

The original project was developed by amazerol and was then optimized by Splitwirez. Once the Avalonia 11 was released it was then ported to 11.0.1 by NOoBODDY. The original version of the component is used in Jaya File Manager, but other projects are welcome to use it as well.

Cross-Platform Support

Given that Avalonia is a cross-platform UI framework and to support the availability, currently, this project is being optimized by Sachith Liyanagama. The overall controls library is refactored as follows.

Project Usecase
AvaloniaUI.Ribbon Desktop, WASM, etc.
AvaloniaUI.Ribbon.Desktop Desktop Only

Available Controls

In order to support the ControlTheme architecture, the controls are currently being either optimized or re-developed if necessary. Based on the platform availability the components are summarized as follows.

Cross-Platform

Control Type Component Type
Ribbon Ribbon
Button RibbonButton
Toggle Button RibbonToggleButton
Split Button RibbonSplitButton
Gallery RibbonGallery
GalleryItem GalleryItem
Drop Down Button RibbonDropDownButton
File Menu RibbonMenu
File Menu Item RibbonMenuItem
Tab RibbonTab
Ribbon Group Box RibbonGroupBox
Ribbon Combo Box RibbonComboBox

Desktop Only

Apart from the above-mentioned global components, the desktop-specific controls are presented below.

Control Type Original
Ribbon Window RibbonWindow
Quick Access Bar QuickAccessToolBar

Previews:

Desktop WASM
Fluent-Light theme Desktop app preview, vertical orientation Fluent-Dark theme WASM web app preview, horizontal orientation
Ribbon Menu / Backstage
Ribbon Menu with grouping of controls and modern design

How to Use

  1. Refer the package according to your usecase as mentioned in above Cross-Platform Support Section.

  2. Include ribbon styles to App.xaml as shown below.

    Default theme:

        <StyleInclude Source="avares://AvaloniaUI.Ribbon/Styles/Fluent/AvaloniaRibbon.xaml" />
    

    "DESKTOP" theme:

        <StyleInclude Source="avares://AvaloniaUI.Ribbon.Desktop/Styles/Default/AvaloniaRibbon.xaml" />
    

    and localized text (same for both themes):

        <ResourceInclude Source="avares://AvaloniaUI.Ribbon/Locale/en-ca.xaml" />
    
    1. Use the below mentioned sample as an example to use the ribbon control. The sample is available in the AvaloniaUI.Ribbon.Demo project.
              <Ribbon Name="RibbonControl" DockPanel.Dock="Top" Orientation="Horizontal" HelpButtonCommand="{Binding HelpCommand}">
                  <RibbonMenu
                  Width="50"
                  KeyTip.KeyTipKeys="F">
                     <RibbonMenuItem Header="New" Group="File" IsTopDocked="True">
                         <RibbonMenuItem.Icon>
                             <Rectangle
                                 Width="32"
                                 Height="32"
                                 Fill="Red" />
                         </RibbonMenuItem.Icon>
                         <RibbonMenuItem.Content></RibbonMenuItem.Content>
                     </RibbonMenuItem>
                     <RibbonMenuItem Header="Open" Group="File" IsTopDocked="True">
                         <RibbonMenuItem.Icon>
                             <Rectangle
                                 Width="32"
                                 Height="32"
                                 Fill="Green" />
                         </RibbonMenuItem.Icon>
                         <RibbonMenuItem.Content>
                             <DockPanel>
                                 <TabControl DockPanel.Dock="Top">
                                     <TabItem Header="TEST" />
                                 </TabControl>
                             </DockPanel>
                         </RibbonMenuItem.Content>
                     </RibbonMenuItem>
                  </Ribbon.Menu>
                  <RibbonTab Header="Button Controls" KeyTip.KeyTipKeys="B">
                      <RibbonTab.Groups>
                          <RibbonGroupBox Header="RibbonButtons" Command="{Binding OnClickCommand}" KeyTip.KeyTipKeys="B">
                              <RibbonButton Content="Large" MinSize="Large" MaxSize="Large">
                                  <RibbonButton.LargeIcon>
                                      <Rectangle Fill="{DynamicResource ThemeForegroundBrush}" Width="32" Height="32">
                                          <Rectangle.OpacityMask>
                                              <ImageBrush Source="/Assets/RibbonIcons/settings.png"/>
                                          </Rectangle.OpacityMask>
                                      </Rectangle>
                                  </RibbonButton.LargeIcon>
                              </RibbonButton>
                          </RibbonGroupBox>
                          <RibbonGroupBox Header="RibbonToggleButtons" Command="{Binding OnClickCommand}" KeyTip.KeyTipKeys="T">
                             <RibbonToggleButton
                                Content="Large"
                                Icon="{DynamicResource Icon1}"
                                LargeIcon="{DynamicResource Icon1Large}"
                                MaxSize="Large"
                                MinSize="Large"
                                QuickAccessIcon="{DynamicResource Icon1QuickAccess}" />
                             <RibbonToggleButton
                                Content="Medium"
                                Icon="{DynamicResource Icon2}"
                                LargeIcon="{DynamicResource Icon2Large}"
                                MaxSize="Medium"
                                MinSize="Medium"
                                QuickAccessIcon="{DynamicResource Icon2QuickAccess}" />
                          </RibbonGroupBox>
                          <RibbonGroupBox Header="RibbonSplitButtons" Command="{Binding OnClickCommand}" KeyTip.KeyTipKeys="S">
                             <SplitButtonControl
                                 x:Name="RibbonSplitButton1"
                                 Content="Large"
                                 Icon="{DynamicResource Icon1}"
                                 LargeIcon="{DynamicResource Icon1Large}"
                                 QuickAccessIcon="{DynamicResource Icon1QuickAccess}"
                                 Size="Large"
                                 Theme="{StaticResource LargeSplitButton}">
                                 <SplitButtonControl.Flyout>
                                     <MenuFlyout Placement="Bottom">
                                         <MenuItem Header="Item 1">
                                             <MenuItem Header="Subitem 1" />
                                             <MenuItem Header="Subitem 2" />
                                             <MenuItem Header="Subitem 3" />
                                         </MenuItem>
                                         <MenuItem Header="Item 2" InputGesture="Ctrl+A" />
                                         <MenuItem Header="Item 3" />
                                     </MenuFlyout>
                                 </SplitButtonControl.Flyout>
                             </SplitButtonControl>
                          </RibbonGroupBox>
                      </RibbonTab.Groups>
                  </RibbonTab>
                  <RibbonTab Header="Galleries" KeyTip.KeyTipKeys="G">
                      <RibbonTab.Groups>
                          <RibbonGroupBox Header="Large gallery" Command="{Binding OnClickCommand}" KeyTip.KeyTipKeys="L">
                               <Gallery Theme="{StaticResource LargeGallery}">
                                 <GalleryItem Content="Item 1">
                                     <GalleryItem.LargeIcon>
                                         <ControlTemplate>
                                             <Rectangle
                                                 Width="32"
                                                 Height="32"
                                                 Fill="Red" />
                                         </ControlTemplate>
                                     </GalleryItem.LargeIcon>
                                 </GalleryItem>
                                 <GalleryItem Content="Item 2">
                                     <GalleryItem.LargeIcon>
                                         <ControlTemplate>
                                             <Rectangle
                                                 Width="32"
                                                 Height="32"
                                                 Fill="OrangeRed" />
                                         </ControlTemplate>
                                     </GalleryItem.LargeIcon>
                                 </GalleryItem>
                               </Gallery>
                          </RibbonGroupBox>
                      </RibbonTab.Groups>
                  </RibbonTab>
              </Ribbon>
      

Change Log

Update (26/01/2025)

  • Add Ribbon ComboBox.
  • Rename the Windows project to Desktop.
  • Solved the KeyTip visibility issue, due to changes in Avalonia 11.x.
  • Remove Default theme.
  • Relocate Ribbon Expander toggle to end of the control.
  • Solve the GroupBox Separator Visibility.
  • Remove the ribbon mouse wheel based scrolling.

Update (21/01/2025)

  • Convert RibbonMenu into modern backstage control with different grouping.
  • New Gallary Item with three sizes.
  • New Cross-Platform Demo projects.
  • Handle ribbon control size change when resize.

Update (21/11/2023)

  • Relocate WindowIcontoImageConverter.
  • Solve the issue with the icon to image converter.
  • Optimize Quick access bar design with separators.
  • Optimize Ribbon Window title Height.
  • Update Windows Sample project with quick access toolbar and DecorationsMode Selector.
  • Create 3 types of gallery themes.(Large, Medium. Small)

Update (05/11/2023)

  • Create Interfaces
  • Refactor Code Base
  • Rename xaml to axaml.
  • Add Cleanup folder script.
  • Update to Avalonia 11.0.5
  • Create Browser Sample Project
  • Optimize references and Desktop Sample Project.

Update (01/03/2021)

  • Update to Avalonia 0.10
  • Added Fluent Theme
  • Added contextual tabs
  • Added Quick Access Toolbar (Experimental)
  • Assorted bugfixes
  • Probably something else I forgot to mention lol

Update (06/03/2020)

  • Re-organized some stuff
  • RibbonWindow is now an actual Window in its own right
  • Control size variants are now properties of a control, rather than entirely separate controls
  • Added dynamic control size adjustment
  • Added Gallery control
  • Major XAML cleanup
  • Switched to using standard Avalonia colours/brushes
  • Added RibbonMenu
  • Ribbon can now be collapsed or expanded (shows selected groups temporarily in a Popup when a tab is clicked if the Ribbon is collapsed)
  • Ribbon can now be horizontally or vertically oriented (real-time value changes are not yet fully functional, but compile-time/startup-time changes should work without a hitch)
  • KeyTips and Keyboard navigation via ALT are now mostly functional
  • Probably something else I forgot to mention lol

Update (14/11/2019)

  • Added separate sample project to demonstrate the usage.
  • Architectural improvements have been done.
  • Standardized control to be an assembly instead of executable.
  • Added ribbon classes to Avalonia's namespace.

Update (23/06/2019)

  • In App.xaml, only one line of <StyleInclude> is required now.
  • Adddition of the special buttons (top part: button, lower part: combobox)
  • The entire control is themable now.
  • Small button added and its HorizontalGroup.
  • Tootips added.

Update (17/06/2019)

  • Control is now fully usable.
  • NuGet done.
  • Wiki has been written.

Below mentioned are some plans for the future.

  • Implement more controls, especially toggle button.
  • Allow color stylesheets for a fully customizable control.
  • Take care of the resizing matters.

Update (16/06/2019)

  • Improvement of the look & feel of the ribbon.
  • Update of the previous preview image with new look & feel.

The remaining things which have be done are as follows.

  • Take care of the disapearance of icons in case of window resizing.
  • Handle click actions easily.

Avalonia Ribbon

Please acknowledge Splitwirez for all the last new features added to the ribbon. As far as I'm concerned, I'm just centralizing code and updating the nuget.

You can also acknowledge Rubal Walia as well for cleaning up all my messy code.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on AvaloniaControls.Ribbon:

Package Downloads
AvaloniaControls.Ribbon.Desktop

Desktop-Specific version of AvaloniaUI Ribbon controls. Incase you would like to develop a single Cross-Platform app, use the AvaloniaControls.Ribbon package instead.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.9.9 273 1/26/2025