Please consider two additional features

May 20, 2010 at 6:06 PM
Hi, Please, consider two additional features. First, RibbonTabControl class "PART_MinimizeButton" Show Part, a property that can hide the Ribbon I'd add the class. Second, Windows 7, the standard software "Paint" or "WordPad" I'd like to add BackstageButton you can set any image instead of text.
Coordinator
May 22, 2010 at 10:12 AM

Thank you for your suggestions. We will investigate it.

Daniel

Jun 1, 2010 at 9:20 AM

Hi, I could be resolved.

Add one property to Ribbon.cs file.

  public static readonly DependencyProperty CanMinimizedProperty =
   DependencyProperty.Register("CanMinimized",
          typeof(bool),
          typeof(Ribbon),
          new UIPropertyMetadata(true));
  public bool CanMinimized
  {
   get { return (bool)GetValue(CanMinimizedProperty); }
   set { SetValue(CanMinimizedProperty, value); }
  }

Add one trigger to RibbonTabControl.xaml file. (RibbonTabControlStyle key)

      <DataTrigger Binding="{Binding Path=CanMinimized, RelativeSource={RelativeSource TemplatedParent}}" Value="False">
       <Setter Property="Visibility" TargetName="PART_MinimizeButton" Value="Collapsed" />
      </DataTrigger>

Jun 14, 2010 at 9:56 AM

Hi, Fixed a bug in one place.

RibbonTabItems.cs

1.       protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
2.       {
3.          if (((e.Source == this) &&(e.ClickCount==2)))
4.          {
5.              Ribbon ribbon = FindParentRibbon();
6.
7.              e.Handled = true;
8.              if (TabControlParent != null && ribbon.CanMinimized)
9.                 
TabControlParent.IsMinimized = !TabControlParent.IsMinimized;
10.         }
11.         else if (((e.Source == this) || !this.IsSelected))
12.         {
13.             if (TabControlParent!=null) if (TabControlParent.SelectedItem is RibbonTabItem)
14.                 (TabControlParent.SelectedItem as RibbonTabItem).IsSelected = false;
15.             e.Handled = true;
16.             this.IsSelected = true;
17.         }           
18.     }

Add the line 5 and modify the line 8.