- gaurav.nema
- Posts: 1
- Joined:
Ribbon control in unity using noesis
Hi,
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.
Thanks
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.
Thanks
-
sfernandez
Site Admin
- Posts: 3188
- Joined:
Re: Ribbon control in unity using noesis
Hi,
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 ).
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:
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.
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 ).
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:
Code: Select all
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
FrameworkElement.DefaultStyleKeyProperty.OverrideMetadata(typeof(Ribbon),
new FrameworkPropertyMetadata(typeof(Ribbon)));
}
}
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: Bing [Bot] and 1 guest