ribboncontrolslibrary

RibbonControlsLibrary - how to disable minimizing?

柔情痞子 提交于 2019-12-06 06:46:26
问题 How to disable minimizing of Ribbon control from RibbonControlsLibrary? 回答1: The following disabled both the double click on the tab header and 'Minimize the Ribbon' on the context menu for me: public class ExRibbon : Ribbon { public override void OnApplyTemplate() { base.OnApplyTemplate(); IsMinimizedProperty.OverrideMetadata(typeof(ExRibbon), new FrameworkPropertyMetadata(false, (o, e) => { }, (o, e) => false)); Type ownerType = typeof(ExRibbon); CommandManager.RegisterClassCommandBinding

How to attach Command to wpf RibbonMenuButton?

守給你的承諾、 提交于 2019-12-05 06:56:00
问题 I want to know how to attach command to RibbonMenuButton item. The following is my initial attempt but the command is never called. <ribbon:RibbonWindow x:Class="RibbonMenuDemo.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary" Title="MainWindow" x:Name="RibbonWindow" Width="640" Height="480"> <Grid x:Name="LayoutRoot">

WPF Ribbon Tab view in Designer

妖精的绣舞 提交于 2019-12-05 02:27:56
I'm using "Microsoft Ribbon for WPF" and creating multiple RibbonTab. I cannot figure out a way to view/focus different tabs in the designer and it by default show the "Home" tab. To see design/xaml changes I made to tabs other than the "Home" tab, I have to debug the project every time and click through the tabs, which is not very convenient. Or I can command out the tab xaml I want to to ignore. Anyone body out there has a solution? You can also use the SelectedIndex property on the Ribbon to set which tab is the currently selected tab (0 being the first tab, 1 being the second, etc.)

RibbonCommand was not found

我只是一个虾纸丫 提交于 2019-12-03 08:21:56
I see the majority of WPF Ribbon examples out there use some code like xmlns:r="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary" I'm getting this error..."The type 'r:RibbonCommand' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built." Using VS 2010, .NET 4.0. I'm trying to figure out how to add a button to the ribbon and execute code/command when it's clicked. Thanks. If you are using the new Microsoft WPF Ribbon, the RibbonCommand type has been removed. The Command property is now an ICommand

How to set text at the head of a RibbonApplicationMenu

江枫思渺然 提交于 2019-12-03 01:21:50
I'm trying to have text in the top level of a RibbonApplicationMenu (trying to the get the word "File" there similar to Word or Outlook). It seems the Microsoft.Windows.Controls.Ribbon.RibbonApplicationMenu http://msdn.microsoft.com/en-us/library/microsoft.windows.controls.ribbon.ribbonapplicationmenu.aspx supports a SmallImageSource but no text property. Setting the Label property doesn't work for this problem. xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary" <ribbon:RibbonApplicationMenu Label="File"> <!--doesn't set the label --> </ribbon

RibbonApplicationMenu: getting rid of the AuxiliaryPane

删除回忆录丶 提交于 2019-12-01 12:58:33
It so happened that the application I'm working on doesn't operate on documents, so there's no need in displaying the recently opened documents list in the application menu. But - annoyingly - there are no properties readily available in the RibbonApplicationMenu class to hide the unused AuxiliaryPane (for which, curiously, the property does exist, but is marked as "internal"). Of course, I can just leave it there - but that's... untidy. So, here's the solution I came up with. Hope it will be helpful for anyone else :-) The general idea is to subclass the RibbonApplicationMenu , find the

RibbonApplicationMenu: getting rid of the AuxiliaryPane

流过昼夜 提交于 2019-12-01 11:10:32
问题 It so happened that the application I'm working on doesn't operate on documents, so there's no need in displaying the recently opened documents list in the application menu. But - annoyingly - there are no properties readily available in the RibbonApplicationMenu class to hide the unused AuxiliaryPane (for which, curiously, the property does exist, but is marked as "internal"). Of course, I can just leave it there - but that's... untidy. So, here's the solution I came up with. Hope it will be

How to databind SelectedItem of RibbonComboBox

随声附和 提交于 2019-11-26 21:49:15
问题 My question is basically this one. I thought it would help to provide some more information and code that makes it easier to reproduce the problem, though. Working with the Microsoft.Windows.Controls.Ribbon.RibbonComboBox from the RibbonControlsLibrary feels like walking through a big bog full of bugs, not something you do if you know a way around it. Anywho. The biggest problem I encountered was databinding my SelectedItem. The following is what I started with (after I found out about