From 91baab1e7c26e381c419383ce9f589fef64909ce Mon Sep 17 00:00:00 2001 From: nishy2000 Date: Mon, 18 Jan 2016 17:44:05 +0900 Subject: [PATCH] Bind a DataContext to a RibbonGroupBox on a QuickAccessToolBar from an original RibbonGroupBox. --- Fluent/Controls/RibbonGroupBox.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Fluent/Controls/RibbonGroupBox.cs b/Fluent/Controls/RibbonGroupBox.cs index 0fff507ea..ecf6138df 100644 --- a/Fluent/Controls/RibbonGroupBox.cs +++ b/Fluent/Controls/RibbonGroupBox.cs @@ -994,6 +994,8 @@ public FrameworkElement CreateQuickAccessItem() { var groupBox = new RibbonGroupBox(); + RibbonControl.BindQuickAccessItem(this, groupBox); + groupBox.DropDownOpened += this.OnQuickAccessOpened; groupBox.DropDownClosed += this.OnQuickAccessClosed; @@ -1013,6 +1015,12 @@ public FrameworkElement CreateQuickAccessItem() RibbonControl.Bind(this, groupBox, "DialogLauncherButtonKeyTipKeys", DialogLauncherButtonKeyTipKeysProperty, BindingMode.OneWay); groupBox.LauncherClick += this.LauncherClick; + var toolTip = this.ToolTip as ToolTip; + if ((toolTip == null || toolTip.ToolTip == null) && this.Header != null) + { + RibbonControl.Bind(this, groupBox, "Header", ToolTipProperty, BindingMode.OneWay); + } + if (this.Icon != null) { var iconVisual = this.Icon as Visual;