From f7ca5be7917eed658ba2362ab1ed5af54c60f38b Mon Sep 17 00:00:00 2001 From: Splitwirez Date: Sun, 3 Mar 2019 16:57:05 -0500 Subject: [PATCH 1/3] preparing to add simplified ribbon --- Fluent.Ribbon.Showcase/Fluent.Ribbon.Showcase.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Fluent.Ribbon.Showcase/Fluent.Ribbon.Showcase.csproj b/Fluent.Ribbon.Showcase/Fluent.Ribbon.Showcase.csproj index e63630797..d347cb08b 100644 --- a/Fluent.Ribbon.Showcase/Fluent.Ribbon.Showcase.csproj +++ b/Fluent.Ribbon.Showcase/Fluent.Ribbon.Showcase.csproj @@ -1,4 +1,4 @@ - + FluentTest From 1cb5a75e474659e5070f7f0b1c4f446a83a0a938 Mon Sep 17 00:00:00 2001 From: Splitwirez Date: Wed, 6 Mar 2019 11:22:53 -0500 Subject: [PATCH 2/3] And so it begins --- .../Fluent.Ribbon.Showcase.csproj | 8 ++ .../SimplifiedRibbonWindow.xaml | 53 ++++++++++++ .../SimplifiedRibbonWindow.xaml.cs | 10 +++ Fluent.Ribbon.Showcase/TestContent.xaml | 3 + Fluent.Ribbon.Showcase/TestContent.xaml.cs | 5 ++ Fluent.Ribbon/Controls/Ribbon.cs | 14 ++++ Fluent.Ribbon/Themes/Controls/Button.xaml | 80 +++++++++++++++++++ Fluent.Ribbon/Themes/Controls/Ribbon.xaml | 3 + .../Themes/Controls/RibbonGroupBox.xaml | 27 ++++++- 9 files changed, 200 insertions(+), 3 deletions(-) create mode 100644 Fluent.Ribbon.Showcase/SimplifiedRibbonWindow.xaml create mode 100644 Fluent.Ribbon.Showcase/SimplifiedRibbonWindow.xaml.cs diff --git a/Fluent.Ribbon.Showcase/Fluent.Ribbon.Showcase.csproj b/Fluent.Ribbon.Showcase/Fluent.Ribbon.Showcase.csproj index d347cb08b..fe6aa74e8 100644 --- a/Fluent.Ribbon.Showcase/Fluent.Ribbon.Showcase.csproj +++ b/Fluent.Ribbon.Showcase/Fluent.Ribbon.Showcase.csproj @@ -14,6 +14,9 @@ Icons\App.ico app.manifest + + + @@ -29,4 +32,9 @@ + + + Code + + \ No newline at end of file diff --git a/Fluent.Ribbon.Showcase/SimplifiedRibbonWindow.xaml b/Fluent.Ribbon.Showcase/SimplifiedRibbonWindow.xaml new file mode 100644 index 000000000..4181b8a19 --- /dev/null +++ b/Fluent.Ribbon.Showcase/SimplifiedRibbonWindow.xaml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Fluent.Ribbon.Showcase/SimplifiedRibbonWindow.xaml.cs b/Fluent.Ribbon.Showcase/SimplifiedRibbonWindow.xaml.cs new file mode 100644 index 000000000..6da3e8e29 --- /dev/null +++ b/Fluent.Ribbon.Showcase/SimplifiedRibbonWindow.xaml.cs @@ -0,0 +1,10 @@ +namespace FluentTest +{ + public partial class SimplifiedRibbonWindow + { + public SimplifiedRibbonWindow() + { + this.InitializeComponent(); + } + } +} diff --git a/Fluent.Ribbon.Showcase/TestContent.xaml b/Fluent.Ribbon.Showcase/TestContent.xaml index a43f032cf..59629e8c0 100644 --- a/Fluent.Ribbon.Showcase/TestContent.xaml +++ b/Fluent.Ribbon.Showcase/TestContent.xaml @@ -3255,6 +3255,9 @@ Pellentesque nec dolor sed lacus tristique rutrum sed vitae urna. Sed eu pharetr Open Ribbon-Window (with background image) + Open Simplified Ribbon-Window diff --git a/Fluent.Ribbon.Showcase/TestContent.xaml.cs b/Fluent.Ribbon.Showcase/TestContent.xaml.cs index 2561e3a26..232cf207f 100644 --- a/Fluent.Ribbon.Showcase/TestContent.xaml.cs +++ b/Fluent.Ribbon.Showcase/TestContent.xaml.cs @@ -505,6 +505,11 @@ private async void HandleShowMetroMessage(object sender, RoutedEventArgs e) await metroWindow.ShowMessageAsync("Test", "Message"); } + + private void OpenSimplifiedRibbonWindow_OnClick(object sender, RoutedEventArgs e) + { + new SimplifiedRibbonWindow().Show(); + } } public class TestRoutedCommand diff --git a/Fluent.Ribbon/Controls/Ribbon.cs b/Fluent.Ribbon/Controls/Ribbon.cs index 9cae60aae..2a1fa2cec 100644 --- a/Fluent.Ribbon/Controls/Ribbon.cs +++ b/Fluent.Ribbon/Controls/Ribbon.cs @@ -612,6 +612,20 @@ public RibbonTabControl TabControl #endregion + /// + /// Gets or sets whether or not the ribbon is in Simplified mode + /// + public bool IsSimplified + { + get { return (bool)this.GetValue(IsSimplifiedProperty); } + set { this.SetValue(IsSimplifiedProperty, value); } + } + + /// + /// for . + /// + public static readonly DependencyProperty IsSimplifiedProperty = DependencyProperty.Register(nameof(IsSimplified), typeof(bool), typeof(Ribbon), new PropertyMetadata(BooleanBoxes.FalseBox)); + /// /// Gets or sets selected tab item /// diff --git a/Fluent.Ribbon/Themes/Controls/Button.xaml b/Fluent.Ribbon/Themes/Controls/Button.xaml index 468811de8..31716cbd1 100644 --- a/Fluent.Ribbon/Themes/Controls/Button.xaml +++ b/Fluent.Ribbon/Themes/Controls/Button.xaml @@ -204,6 +204,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Fluent.Ribbon/Themes/Controls/Ribbon.xaml b/Fluent.Ribbon/Themes/Controls/Ribbon.xaml index 0e3079bbb..ab0fc813c 100644 --- a/Fluent.Ribbon/Themes/Controls/Ribbon.xaml +++ b/Fluent.Ribbon/Themes/Controls/Ribbon.xaml @@ -79,6 +79,9 @@ TargetName="quickAccessToolBarHolder" Value="Collapsed" /> + + + diff --git a/Fluent.Ribbon/Themes/Controls/RibbonGroupBox.xaml b/Fluent.Ribbon/Themes/Controls/RibbonGroupBox.xaml index 250c15f6a..f80c11b6d 100644 --- a/Fluent.Ribbon/Themes/Controls/RibbonGroupBox.xaml +++ b/Fluent.Ribbon/Themes/Controls/RibbonGroupBox.xaml @@ -13,12 +13,17 @@ - + + + + + @@ -264,6 +269,14 @@ Height="Auto" IsItemsHost="True" Margin="4,0,4,0" /> + - + + + + + + + Date: Tue, 12 Mar 2019 13:57:51 -0400 Subject: [PATCH 3/3] Medium icons --- .../SimplifiedRibbonWindow.xaml | 16 ++++++++-------- Fluent.Ribbon/Controls/Button.cs | 15 +++++++++++++++ Fluent.Ribbon/Themes/Controls/Button.xaml | 2 +- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/Fluent.Ribbon.Showcase/SimplifiedRibbonWindow.xaml b/Fluent.Ribbon.Showcase/SimplifiedRibbonWindow.xaml index 4181b8a19..25f08d62c 100644 --- a/Fluent.Ribbon.Showcase/SimplifiedRibbonWindow.xaml +++ b/Fluent.Ribbon.Showcase/SimplifiedRibbonWindow.xaml @@ -20,26 +20,26 @@ - + - + - + - + - + - + - + - + diff --git a/Fluent.Ribbon/Controls/Button.cs b/Fluent.Ribbon/Controls/Button.cs index e6183f6fa..05e9e2dcc 100644 --- a/Fluent.Ribbon/Controls/Button.cs +++ b/Fluent.Ribbon/Controls/Button.cs @@ -112,6 +112,21 @@ public object LargeIcon /// public static readonly DependencyProperty LargeIconProperty = DependencyProperty.Register(nameof(LargeIcon), typeof(object), typeof(Button), new PropertyMetadata()); + /// + /// a + /// + public object MediumIcon + { + get { return this.GetValue(MediumIconProperty); } + set { this.SetValue(MediumIconProperty, value); } + } + + /// + /// Using a DependencyProperty as the backing store for SmallIcon. + /// This enables animation, styling, binding, etc... + /// + public static readonly DependencyProperty MediumIconProperty = DependencyProperty.Register(nameof(MediumIcon), typeof(object), typeof(Button), new PropertyMetadata()); + #endregion #region IsDefinitive diff --git a/Fluent.Ribbon/Themes/Controls/Button.xaml b/Fluent.Ribbon/Themes/Controls/Button.xaml index 31716cbd1..17a89c131 100644 --- a/Fluent.Ribbon/Themes/Controls/Button.xaml +++ b/Fluent.Ribbon/Themes/Controls/Button.xaml @@ -221,7 +221,7 @@ HorizontalAlignment="Center" Height="24" VerticalAlignment="Center" - Content="{converters:ObjectToImageConverter {Binding Icon, RelativeSource={RelativeSource TemplatedParent}}, '16,16', {Binding RelativeSource={RelativeSource TemplatedParent}}}" + Content="{converters:ObjectToImageConverter {Binding MediumIcon, RelativeSource={RelativeSource TemplatedParent}}, '16,16', {Binding RelativeSource={RelativeSource TemplatedParent}}}" Width="24" Margin="0" SnapsToDevicePixels="True" />