ribboncontrolslibrary

How to style RibbonComboBox

这一生的挚爱 提交于 2020-01-25 23:12:08
问题 I have described my problems with binding the SelectedItem of the RibbonComboBox. Another very ugly issue arises when trying to style this control. Starting with the unstyled ComboBox from the post mentioned above: <r:RibbonComboBox > <r:RibbonGallery SelectedItem="{Binding SelectedItem, Mode=TwoWay}"> <r:RibbonGalleryCategory ItemsSource="{Binding Controls}" DisplayMemberPath="Caption" /> </r:RibbonGallery> </r:RibbonComboBox> I get the expected result: But when applying a style with the

How to set SelectedItem on a RibbonComboBox using MVVM?

匆匆过客 提交于 2020-01-11 11:05:23
问题 How do I set the SelectedItem on a RibbonComboBox using MVVM pattern? View <ribbon:RibbonComboBox> <ribbon:RibbonGallery SelectedItem="{Binding Foobar, Mode=TwoWay}"> <ribbon:RibbonGalleryCategory ItemsSource="{Binding Foobars}" DisplayMemberPath="FoobarID" /> </ribbon:RibbonGallery> </ribbon:RibbonComboBox> ViewModel // Selected Item private Foobar _foobar { get; set; } public Foobar Foobar { get { return _foobar; } set { if (value == _foobar || value == null) return; _foobar = value; base

RibbonCommand was not found

断了今生、忘了曾经 提交于 2020-01-01 03:26:23
问题 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. 回答1: If you are using the

WPF right align ribbon button

我的梦境 提交于 2019-12-25 07:15:30
问题 Is there a way to align a ribbon button to the right? I'm using Microsoft ribbon. Thanks, Raymond 回答1: The question is already solved in this link. put it in ribbon group. RibbonButton not aligning properly in Ribbon Control in WPF 来源: https://stackoverflow.com/questions/12468120/wpf-right-align-ribbon-button

16x16 pixel images in RibbonApplicationMenuItem gets stretched

陌路散爱 提交于 2019-12-12 01:08:37
问题 I am having a ribbon application menu that looks like this: <ribbon:RibbonWindow> <DockPanel> <ribbon:Ribbon DockPanel.Dock="Top"> <ribbon:Ribbon.ApplicationMenu> <ribbon:RibbonApplicationMenu> <ribbon:RibbonApplicationMenuItem Header="Users" ImageSource="Users16x16.png" Command="{Binding FooBinding}"/> </ribbon:RibbonApplicationMenu> </ribbon:Ribbon.ApplicationMenu> </ribbon:Ribbon> </DockPanel> </ribbon:RibbonWindow> The resulting image looks like this, stretched. So how do I have a ribbon

WPF Ribbon Contextual Tab Visibility binding

亡梦爱人 提交于 2019-12-11 18:56:56
问题 I am finding it surprisingly hard to find examples of binding the visibility of a RibbonContextualTabGroup. I have a property in my code-behind that should decide when to display a ribbon tab, but everything I've tried so far has no effect. My code-behind is essentially: public partial class MainWindow : RibbonWindow { public string Port { get; set; } } A summary of my WPF code is below. I'm looking for a solution that binds the Visibility property to whether or not MainWindow.Port is null .

WPF - MergedDictionary using RibbonControlsLibrary in xaml

断了今生、忘了曾经 提交于 2019-12-11 17:12:38
问题 In code behind, this works: this.Resources.MergedDictionaries.Add(Microsoft.Windows.Controls.Ribbon.PopularApplicationSkins.Office2007Black); How do I do this in xaml? 回答1: Try the following:- <Window x:Class="WPFRibbon.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:r="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary" Title="Window1" Height="300" Width="400"> <Window

How to set text at the head of a RibbonApplicationMenu

て烟熏妆下的殇ゞ 提交于 2019-12-09 04:32:48
问题 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

Getting a FileNotFoundException for RibbonControlsLibrary.Aero2

心已入冬 提交于 2019-12-08 03:52:56
问题 I recently started getting this error when trying to run a project that uses the WPF Ribbon. It had been working on this machine prior, but for some reason it's not now. The library from here is installed on this machine properly. The exact exception message: "Could not load file or assembly 'RibbonControlsLibrary.Aero2, Version=4.0.0.11019, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.":"RibbonControlsLibrary.Aero2,

WPF Ribbon Tab view in Designer

亡梦爱人 提交于 2019-12-06 23:07:22
问题 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? 回答1: You can also use the SelectedIndex property on the