Topic Author
Posts: 1
Joined: 03 Dec 2015, 04:11

Ribbon control in unity using noesis

04 Dec 2015, 05:18


I want to use wpf like ribbon control in my unity project.

I know that noesis does not support the ribbon control out of box. So how do I go about it?

I am just beginning to evaluate noesisgui for our needs so have very minimal experience with it. Apologies if I am asking something very obvious.

User avatar
Site Admin
Posts: 1915
Joined: 22 Dec 2011, 19:20

Re: Ribbon control in unity using noesis

04 Dec 2015, 18:20


The Ribbon control, looking at the source code you can download from Microsoft, seems quite complex (I counted more than 50 classes involved in the implementation :shock: ).

Right now custom controls support is very limited in our current Unity API, so I think it will be impossible to just import Microsoft sources and fix/workaround all the problems.

Instead I suggest looking at this article explaining the different parts that form the complete Ribbon control, and start building small pieces, until you have all the functionality you need (and nothing else).

For example, I will start by defining the Ribbon as a simple control extending a TabControl:
using Noesis;

public class Ribbon: TabControl
  static Ribbon()
    // This is needed if you want that a implicit style can be found for this custom control. This way
    // the ControlTemplate you define for the Ribbon in the theme style will be applied automatically
      new FrameworkPropertyMetadata(typeof(Ribbon)));
Each tab will be an horizontal StackPanel that contains RibbonGroups. A RibbonGroup could be a HeaderedItemsControl that uses a vertical WrapPanel to host the items (Buttons, Menus, ...).

Most of the work here will be to design the templates to match the appearance you like for your Ribbon control.

From here you can expand the implementation as you need.

Who is online

Users browsing this forum: Google [Bot] and 1 guest