Coder Social home page Coder Social logo

fluentribbon / fluent.ribbon Goto Github PK

View Code? Open in Web Editor NEW
2.4K 145.0 508.0 81.87 MB

WPF Ribbon control like in Office

Home Page: http://fluentribbon.github.io

License: MIT License

C# 99.55% PowerShell 0.20% HLSL 0.08% Batchfile 0.01% Shell 0.16%
ribbon c-sharp wpf xaml office showcase-application hacktoberfest control csharp dotnet

fluent.ribbon's People

Contributors

abdelkarim avatar athari avatar batzen avatar blueberryy avatar cbra-caa avatar chrfin avatar cubey2019 avatar dependabot-preview[bot] avatar dependabot[bot] avatar floele avatar floele-ww avatar gamegeartw avatar geertvanhorrik avatar gerhobbelt avatar kalatchev avatar leixao avatar macry avatar maurosampietro avatar muhammadsulaiman001 avatar natalil avatar nishy2000 avatar noctis0430 avatar pekspro avatar petsuter avatar pschimmel avatar robertmuehsig avatar splitwirez avatar stylefish avatar tbolon avatar zuijiuzhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fluent.ribbon's Issues

Fluent.MetroWindow no longer works on v 3.0.3.0

The following works in v 2.1

Fluent:MetroWindow x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent"
Title="Window1" Height="300" Width="300"

Grid

Grid

Fluent:MetroWindow

However, if i run the same code in v 3.0.3.0, i get an error indicating that Fluent:MetroWindow was not found. I have the the correct reference. when i try to build i get the following error.

The name "MetroWindow" does not exist in the namespace "clr-namespace:Fluent;assembly=Fluent".
The tag 'MetroWindow' does not exist in XML namespace 'clr-namespace:Fluent;assembly=Fluent'. Line 1 Position 21
The type 'Fluent:MetroWindow' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built

I've looked all over and tried a couple of suggestion without success. Any help would be appreciated.

Thanks

Changing menu font size in Windows mess ups ribbon

Itโ€™s possible to change the menu font size in the screen settings in Windows. But this could mess up the Ribbon quite a bit I think. It could look like this:

menufonterror

Personally I think itโ€™s a good idea to respect the Window settings, but maybe not in this case. Interestingly the ribbon in Office 2013 do this, but not the ribbon used in Windows 8 (and also in Windows 10 preview).

Ribbon Button: when passing the same icon file to the properties Icon and LargeIcon, the control doesn't seem to take the good icon frame

I have an application with several ribbon buttons, to which I pass icon files to the properties Icon and LargeIcon.
The thing is that button controls don't seem to take the good icon frame for the property Icon.
For instance, I have an icon file, which have several frames from 16x16 to 64x64. When looking at the resulting ribbon button, it seems to always take the 32x32 frame and then resize this one to fit within the button instead of taking the 32x32 frame for LargeIcon and the 16x16 frame for Icon.
Well, it would be the ideal behaviour at 96dpi. But at higher dpi, buttons should try to grab frames with higher pixel sizes.

Text display: ribbon controls doesn't always seem to activate ClearType

It seems that, when WPF is left alone with ClearType activation management, WPF is really too aggressive at disabling ClearType (see http://blogs.msdn.com/b/text/archive/2010/01/15/cleartypehint.aspx).
It's really visible with the Fluent ribbon control as labels and texts are randomly changing from sharp and clear to smudged and clogged. Sometimes, it can happen simply by hovering in and out with the mouse changing the text background.
So it would probably be good to use RenderOptions.ClearTypeHint="Enabled" wherever needed.

Backstage BackButton

Hello
I put the the "Fluent:Ribbon" component in a Page. Everything works fine except the BackButton form the Backstage. The Button is visible but I can't click the button. I don't know if this is a bug or if I just can't place the Ribbon in a Page. Hopefully you guys have a solution for me ...

Showing dialog before main window loads causes problems

Copied from CodePlex https://fluent.codeplex.com/workitem/22510 and from https://fluent.codeplex.com/workitem/22496

Before the main window loads, our software may ask the user to supply some additional information so it can start correctly. After we implemented the appropriate dialogs, we noticed that bound quick access items no longer display. We are using the stable version of the Ribbon from Nuget (2.0.2).

To reproduce, I downloaded the current source and tested in the 'Fluent dotNET 4.5' solution. We don't currently use state management in our app, so I changed that setting in TestContent.

<Fluent:Ribbon AutomaticStateManagement="False" x:Name="ribbon">

I then added a MessageBox in the TestWindow constructor. After running and dismissing the message box, the result is as shown in the attached image. Only the non-bound quick access item displays. The drop-down has several empty spots where the bound items would have presented.

Also note that the contextual groups are absent.

Quick Access Toolbar IsChecked never correctly set

Hi, I have created a really simple Ribbon. The following is the Quick Access Toolbar Section of code:

<r:QuickAccessMenuItem IsChecked="True" Visibility="Visible">
<r:Button Header="Tasks" Icon="Images/tasksicon.png" Visibility="Visible"/>
</r:QuickAccessMenuItem>
<r:QuickAccessMenuItem IsChecked="True" Visibility="Visible">
<r:Button Header="Messages" Icon="Images/messagesicon.png" Visibility="Visible"/>
</r:QuickAccessMenuItem>
</r:Ribbon.QuickAccessItems> 

With that whenever I load the application the Messages and Tasks Items are both hidden and I have to click to select them for them to appear. And yet if I was to select them and then close the application and re-run it the items appear again. However, If I close Blend down and reopen then the items are again not shown.

ColorGallery SelectedColor

Hi,
i think i have found a bug when set a color with SelectedColor to a ColorGallery. The color is after "SelectedColor = Colors.Red", as sample, set in the ColorGallery. But the ListBox in the Gallery don't change the SelectedItem. So the ListBox ignore the new color which i have set.

In the code of the Gallery, i see the isLoaded-Property in "UpdateSelectedColor"-function is always false when color is set manually, because the control is not visible (loaded).

Thx

Windows 8 Theme

I have had some thoughts to create a "Windows 8"-theme to the Fluent Ribbon project. Today I spend some hours and I've now have something that looks like this:

win8themedemo

This is just my playing around. Nothing serious, I just took the white Office 2010 theme and tweaked it. There is several things still that needs to be solved. I wanted to see if this is feasible to do and I think it is. But I must say that all these controls in borders in other borders that is in other borders could be confusing :-).

If I decide to do this more serious, is there a chance that this will be merged into the main project? If yes, is there any guide lines I should follow? Should I create a totally new theme or just a new "Color" to the Office 2010 theme? Just changing colors is not enough - Windows 8 theme doesn't have any gradients or rounded corners but if these things also getting theme based it might be possible.

My ambition is to have something that looks like the ribbon bar in Explorer, Wordpad and Paint in Windows 8. I can't promise that I will be able to solve everything but I think it is worth to try :-)

App crashes if to press alt several times

App crashes if to press alt several times.

Application: SIM.Tool.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentNullException
Stack:
at MS.Internal.Media.VisualTreeUtils.AsNonNullVisual(System.Windows.DependencyObject, System.Windows.Media.Visual ByRef, System.Windows.Media.Media3D.Visual3D ByRef)
at System.Windows.Media.VisualTreeHelper.GetChildrenCount(System.Windows.DependencyObject)
at Fluent.Internal.UIHelper.FindImmediateVisualChild[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Windows.DependencyObject, System.Predicate`1<System.__Canon)
at Fluent.KeyTipService.GetBackstage()
at Fluent.KeyTipService.Show()
at Fluent.KeyTipService.ShowImmediatly()
at Fluent.KeyTipService.OnWindowKeyUp(System.Object, System.Windows.Input.KeyEventArgs)
at System.Windows.Input.KeyEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawKeyboardActions, Int32, Boolean, Boolean, Int32)
at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(System.Windows.Interop.MSG ByRef, Boolean ByRef)
at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(System.Windows.Interop.MSG ByRef, System.Windows.Input.ModifierKeys)
at System.Windows.Interop.HwndSource.OnPreprocessMessage(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at System.Windows.Threading.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority, System.Delegate, System.Object)
at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(System.Windows.Interop.MSG ByRef, Boolean ByRef)
at System.Windows.Interop.HwndSource+WeakEventPreprocessMessage.OnPreprocessMessage(System.Windows.Interop.MSG ByRef, Boolean ByRef)
at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at System.Windows.Application.Run(System.Windows.Window)
at SIM.Tool.App.Main()

Press Alt key without Backstage raises ArgumentNullException

I'm using Office2013 Fluent theme without Backstage menu.

master1

โ†‘ It raises ArgumentNullException when I type Alt key. (Without Backstage menu)

master1f

โ†‘ It will display popup [F] around Backstage menu, when I type Alt key. (With a dummy Backstage menu)

Hmm.. Is there good workaround?

Modern Fluent theme is very very beautiful. I love it!
Thanks!
kenji uno

Drop support for ancient .NET 3.5

I will drop support for .NET 3.5 in version 3.2.
If you got any reasons to keep it, feel free to comment this issue and start a discussion.

Remove NuGet Restore from Solution

Since NuGet 2, you don't need to use the NuGet Restore option. Nuget will automatically restore missing packages on build. Means you can remove the Nuget Folder and the 3 binary files from repository.

Office2013 Icon fixing

I found a way to make the icon shown in the title bar clear, but I don't know how to send a patch.
Just open Themes\Office2013\RibbonWindow.xaml, then find the "PART_Icon" and change its Margin to "8,1,0,0", and the Icon will be clear.

By the way, I find it possible to enable "Touching Mode", changing the margin and size in the xaml of controls, but it seems too hard for me to change many files.

My English isn't very good..

Programmatically creating buttons

In the test project you have the code below, but it doesn't deal with Icons, can you please provide an example of the below which deals with large and small icons... along with the test icons as I can't get it to happen

public Button CreateRibbonButton()
{
    var button = new Button();
    var fooCommand1 = new FooCommand1();
    button.Command = fooCommand1.ItemCommand;

    button.Header = "Foo";

    this.CommandBindings.Add(fooCommand1.ItemCommandBinding);
    return button;
}

Tabs are disabled when using datatemplate for viewmodel in window content

When referencing a viewmodel in the view, only the active tab's buttons are enabled. All other functions seem to be disabled: backstage, tabs, collapse, etc.

To duplicate the problem, in the TestWindow.xaml, replace the following code and run the test project:

<FluentTest:TestContent x:Name="TestContent" />
With:
<DataTemplate DataType="{x:Type viewModels:MainViewModel}">
&lt;FluentTest:TestContent /&gt;

</DataTemplate>
</Window.Resources>
<viewModels:MainViewModel></viewModels:MainViewModel>

command

Hallo,

I dont know where to place these kind of questions. I updated from version 2.1 to 3.2. Now my Commands are not working everywhere. Have something changed about commands?

Little style bug in Windows 8 theme

Hi,
in the new version 3.3.0.0 (SRC ) is available with the Theme Windows 8 in the backstage area again the button style bug.
And the backstage style is from Office 2010 , which is intentional?

screenshot

Review TODO:s in Windows 8 theme

In the Windows 8 theme I have left 6 TODO:s in the XAML-code for review. I think most of them are for components that are not in use and could be removed. If not I want to know how they are used so I could test them :-).

Line break in _minimizeButtonScreenTipText

In RibbonLocation.cs there is this line:

_minimizeButtonScreenTipText = "Need a bit more space? Collapse the\nribbon so only the tab names show.";

The line break before "ribbon" looks quite funny in the tooltip I think.

Backstage does not open at application start anymore

For some reason it stopped working in my project. I had Backstage opening initially when run and specifically selecting the Recent Files Tab on Backstage. When I Compiled the new 3.0.3 into my project it seems to not be working now. I added a Print Tab to the TabItems around the same time but Removing that tabs contents don't seem to return the Backstage Is Open functionality.

I have a Trigger setup with OnIsOpenChanged and it triggers when the Window is supposed to be opening but now I get an error that Backstage cannot see one of my Tabs.

Could someone please confirm the backstage.IsOpen = true; command still opens the Backstage window? It would at least tell me it's something I've added in my code.

RibbonTitleBar.MeasureOverride should not return the constraint parameter value

Hi,

I am trying to use FluentRibbon in a WPF app which use Caliburn.Micro.

Certainly because of the way caliburn micro (and my code) instanciates my UserControl where my ribbon is defined, the MeasureOverride for the RibbonTitleBar control is called with my entire screen width as constraint.

And because the methods returns the parameter instead of returning the real control dimension, my window's width is set to my entire screen width (instead of just what is needed).

MSDN states that MeasureOverride should return the real minimum size required by the control, and not the constraint size, as it could be interpreted as a required size for the control to be correctly displayed.

I have found a way to get the correct behavior, it requires 2 modifications:

  1. Update MeasureOverride in RibbonTitleBar to return the real size instead of the constraint:
/// <summary>
/// Called to remeasure a control.
/// </summary>
/// <param name="constraint">The maximum size that the method can return.</param>
/// <returns>The size of the control, up to the maximum specified by constraint.</returns>
protected override Size MeasureOverride(Size constraint)
{
    if (this.isAtLeastOneRequiredControlPresent == false)
    {
        return base.MeasureOverride(constraint);
    }

    if (this.IsCollapsed)
    {
        return base.MeasureOverride(constraint);
    }

    var resultSize = constraint;

    if (double.IsPositiveInfinity(resultSize.Width)
        || double.IsPositiveInfinity(resultSize.Height))
    {
        resultSize = base.MeasureOverride(resultSize);
    }

    this.Update(resultSize);

    this.itemsContainer.Measure(this.itemsRect.Size);
    this.headerHolder.Measure(this.headerRect.Size);
    this.quickAccessToolbarHolder.Measure(this.quickAccessToolbarRect.Size);

    // We do not return resultsize anymore, instead we compute the real size required by the controls
    //return resultSize;

    var maxHeight = Math.Max(Math.Max(this.itemsRect.Height, this.headerRect.Height), this.quickAccessToolbarRect.Height);
    var width = this.itemsRect.Width + this.headerRect.Width + this.quickAccessToolbarRect.Width;

    return new Size(width, maxHeight);
}
  1. Update the theme files. The previous change results in the titlebar being centered on the top of the window instead of using all the available space. The RibbonControlTemplate in Ribbon.xaml must be updated to set the Fluent:RibbonTitleBar left aligned. For example in Office2013 theme:
<Fluent:RibbonTitleBar x:Name="PART_RibbonTitleBar"
                        Height="{Binding Path=(Fluent:RibbonProperties.TitleBarHeight), RelativeSource={RelativeSource Self}}"
                        Style="{DynamicResource RibbonTitleBarStyle}"
                        Margin="36,0,113,0"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Left"
                        IsCollapsed="{TemplateBinding IsCollapsed}">

I can submit a PR with this bug, or let you fix this issue by yourself, as you prefer.

Thanks !

Blurred Window Icon in Office 2013 Style

When using the Office 2013 style, the icon of the window gets stretched by 1px (height only), which results in a blurred icon. I was able to reproduce this bug using the FluentTest and my own application.

blurred

Little Bug in Office2010 style

When using Theme Office2010 in the Backstage > New, the button and the Combobox is not fully subscribed. The DropDownButton is OK.
Little Bug in Style="{DynamicResource ButtonBackstageStyle}"??

backstage2

Ribbon app background is black

First time to use ribbon, i followed the walkthrough to write my first ribbon app.when i run the app i got nothing but a window with black background. any help will be appreciate! thanks.
2014-12-05_163529

Create single solution with all projects

There are 3 solutions with platform targeted projects. I recommend to create a single solution as well with all the projects in a single sln. Makes things much more manageable.

ContextMenu and Popup has 10px space at bottom and right side

On a touch screen, Menu is displayed on the left of focus. Look at the picture below:

Image
https://onedrive.live.com/embed?cid=FF860405C40AB4A9&resid=FF860405C40AB4A9%217423&authkey=ACdNH2EeZNWxdJ8

It is a dropdownbutton, the right edge of the menu and the right edge of the button are right-aligned. But there is 10px to display the shadow!

The picture below shows a contextmenu:

Image
https://onedrive.live.com/embed?cid=FF860405C40AB4A9&resid=FF860405C40AB4A9%217422&authkey=AGBPsxCWNIK6n9A

This may caused by these code(XAML), these code exist in all kind of controls which contains menus.

Image
https://onedrive.live.com/embed?cid=FF860405C40AB4A9&resid=FF860405C40AB4A9%217424&authkey=AHWCyvbzPB0GEBk

So, some measures should be taken to deal with it.

the ToolTip of a RibbonTabItem

According to the behavior of Microsoft Office Ribbon, the ToolTip of a RibbonTabItem will not display unless the Header is not long enough, when you put the mouse over the Header of a RibbonTabItem. But this library does not act as this.

hiding keytips

Dear sir,

i am using document editor from codeplex.it has 3 buttons on top,new open and close.all these 3 buttons show 1,2,3 as keytip.when i try to change and remove that keytips nothing happens.i use the code in vb.net.

OpenMenuItem.KeyTip = "aa"
OpenMenuItem.KeyTip = nothing

thanks

A simple code to enable RibbonTabControl react to touch manipulation

When the width of the window is small, but there are many contents in ribbon, some of which will be hidden.
https://skydrive.live.com/redir?resid=FF860405C40AB4A9!7494

If you add such a simple code

<Setter Property="PanningMode" Value="HorizontalOnly"/>

to file:

Fluent\Themes\Office2010\Controls\RibbonTabControl.xaml
Line No. 327

and file:

Fluent\Themes\Office2013\Controls\RibbonTabControl.xaml
Line No. 325

just like this:

https://skydrive.live.com/redir?resid=FF860405C40AB4A9!7495

will enable RibbonTabControl react to touch manipulation.

If you have a touch screen, you may put your finger on the blank of a RibbonTabItem which contains too many contents, and move your finger, the contents will move horizontally.

By the way, some code in xaml files are not well organized, you may format them.

Problem with Mouse Capture on SplitButton

Hello,

We are using FluentRibbon in a Complex Layout with AvalonDock, and much more...

Since we have upgraded to the last Version we have the Problem, that when we Open a new Tab in Avalondock, via Press on a FluentSplitButton DropDown, the MouseCapture is not Released, and nothing is clickable, till we press the right mouse button. If we use the main Button on the FluentSplitButton, not one from the DropDown, everything works....

RegionAdapter for Prism

Hi List,
i run Prism 5.x together with Fluent.Ribbon 2.x, all work's perfectly. After update to Fluent.Ribbon 3.xx from Nuget the RegionManger is unable to find my Regions.
The code below works with Fluent.Ribbon 2.x

public class RibbonTabRegionAdapter : RegionAdapterBase
{
public RibbonTabRegionAdapter(IRegionBehaviorFactory behaviorFactory)
: base(behaviorFactory)
{
}
protected override void Adapt(IRegion region, Ribbon regionTarget)
{
if (region == null) throw new ArgumentNullException("Region");
if (regionTarget == null) throw new ArgumentNullException("RegionTarget");

        region.ActiveViews.CollectionChanged += (s, args) =>
        {
            switch (args.Action)
            {
                case NotifyCollectionChangedAction.Add:
                    {
                        foreach (Object view in args.NewItems)
                        {
                            AddViewToRegion(view, regionTarget);
                        }
                        break;
                    }
                case NotifyCollectionChangedAction.Remove:
                    {
                        foreach (Object view in args.OldItems)
                        {
                            RemoveViewFromRegion(view, regionTarget);
                        }
                        break;
                    }
                default:
                    {
                        // Do nothing.
                        break;
                    }
            }
        };
    }


protected override IRegion CreateRegion()
    {
        return new AllActiveRegion();
    }


    static void AddViewToRegion(Object view, Ribbon wpfRibbon)
    {
        var ribbonTab = view as RibbonTabItem;
        if (ribbonTab != null)
            wpfRibbon.Tabs.Add(ribbonTab);
    }

    static void RemoveViewFromRegion(Object view, Ribbon wpfRibbon)
    {
        var ribbonTab = view as RibbonTabItem;
        if (ribbonTab != null)
            wpfRibbon.Tabs.Remove(ribbonTab);
    }

}

public class TabItemRegionAdapter : RegionAdapterBase
{
public TabItemRegionAdapter(IRegionBehaviorFactory regionBehaviorFactory) : base(regionBehaviorFactory)
{
}

    protected override void Adapt(IRegion region, RibbonTabItem regionTarget)
    {
        region.Views.CollectionChanged += (sender, args) => ViewsOnCollectionChanged(regionTarget, args);
    }

    private static void ViewsOnCollectionChanged(RibbonTabItem regionTarget, NotifyCollectionChangedEventArgs e)
    {
        switch (e.Action)
        {
            case NotifyCollectionChangedAction.Add:
                foreach (var newItem in e.NewItems)
                {
                    regionTarget.Groups.Add((RibbonGroupBox) newItem);
                }
                regionTarget.BringIntoView();
                break;
            case NotifyCollectionChangedAction.Remove:
                foreach (var oldItem in e.OldItems)
                {
                    regionTarget.Groups.Remove((RibbonGroupBox) oldItem);
                }
                break;
        }
    }

    protected override IRegion CreateRegion()
    {
        return new AllActiveRegion();
    }
}

Any ideas
Thanks in advance
Peter

Organize ribbon xaml file

Our ribbon starts to have many tabs, containing many controls.
As a consequence the ribbon xaml is endless, thwarting easy navigation or search.

It would be ideal if the big xaml could be split into multiple xaml files, but alas...
Or have I missed an efficient way to organize the ribbon xaml ?

Application menu button has wrong height

In the current source the Application menu button seems to have the wrong height. Just switch to application menu in the test application to see the difference. The button should be one pixel higher or so.

Backstage flicker

The top of the backstage menu flickers white when it animates open/closed. I don't think I'm doing anything different than the demo app, which does animate properly.

It seems to just happen where the window's title bar is underneath. Rest of the backstage animates smoothly. I was able to capture it:
untitled

Any ideas? Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.