Skip to content

Commit

Permalink
Bind a DataContext to a RibbonGroupBox on a QuickAccessToolBar from a…
Browse files Browse the repository at this point in the history
…n original RibbonGroupBox.
  • Loading branch information
nishy2000 committed Jan 18, 2016
1 parent 1517b45 commit 91baab1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Fluent/Controls/RibbonGroupBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,8 @@ public FrameworkElement CreateQuickAccessItem()
{
var groupBox = new RibbonGroupBox();

RibbonControl.BindQuickAccessItem(this, groupBox);

groupBox.DropDownOpened += this.OnQuickAccessOpened;
groupBox.DropDownClosed += this.OnQuickAccessClosed;

Expand All @@ -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;
Expand Down

0 comments on commit 91baab1

Please sign in to comment.