From 0442b1d8b095d8b813af564d6b296db81b204416 Mon Sep 17 00:00:00 2001 From: harborsiem Date: Wed, 25 Jan 2023 16:33:33 +0100 Subject: [PATCH] Comments, Readme.md --- Readme.md | 7 +- .../Controls/Events/ColorPickerEventArgs.cs | 2 +- .../Controls/Events/FontControlEventArgs.cs | 349 ++++++++++++------ .../Controls/Events/GalleryItemEventArgs.cs | 2 +- .../Controls/Events/RecentItemsEventArgs.cs | 2 +- Samples/CS/NewFunctions/RibbonItems.cs | 6 +- 6 files changed, 254 insertions(+), 114 deletions(-) diff --git a/Readme.md b/Readme.md index 640549f..487c6d2 100644 --- a/Readme.md +++ b/Readme.md @@ -38,10 +38,9 @@ Following is the list of sample application and their description: - **17 - QuickAccessToolbar** WinForms application that demonstrates the use of quick access toolbar. - **18 - SizeDefinition** WinForms application that demonstrates the use of custom layout templates. - **19 - Localization** WinForms application that demonstrates how to localize your ribbon. +- **NewFunctions** WinForms application that demonstrates new functions with Ribbon version 2.14 and above see also: -[Codeplex archive](https://archive.codeplex.com/?p=windowsribbon) - [Documentation archive](https://www.codeproject.com/Articles/55599/Windows-Ribbon-for-WinForms-Part-Table-of-Conten) [Current Documentation](https://github.com/harborsiem/WindowsRibbon/wiki) @@ -54,7 +53,7 @@ Now the WindowsRibbon project is running also in the latest Visual Studio Versio --- -WindowsRibbon is also available on NuGet, with Package Id [WindowsRibbon](https://www.nuget.org/packages/WindowsRibbon). Via this package you can get a compiled Ribbon Library also for .NET Framework 4.0, .NET Core 3.1, .NET 5 and .NET6 +WindowsRibbon is also available on NuGet, with Package Id [WindowsRibbon](https://www.nuget.org/packages/WindowsRibbon). Via this package you can get a compiled Ribbon Library also for .NET Framework 4.0, .NET 6 and .NET 7 --- @@ -73,5 +72,3 @@ An other C# Application with the Ribbon Control one can find at the following pa ## Installation: Requirement for installation is the Microsoft .NET Framework 4.6.2 or any higher version. If it is not installed on your computer then you can download it from a Microsoft page. Install this first. - -You also need Microsoft .NET Framework 3.5. In Windows 10 you have to go to the Control Panel > Programs > Programs and Features. On the left side click to "Turn Windows features on or off". You get a new dialog. Here you have to select ".NET Framework 3.5 (includes ...)". diff --git a/Ribbon/Controls/Events/ColorPickerEventArgs.cs b/Ribbon/Controls/Events/ColorPickerEventArgs.cs index ad73483..e52ea87 100644 --- a/Ribbon/Controls/Events/ColorPickerEventArgs.cs +++ b/Ribbon/Controls/Events/ColorPickerEventArgs.cs @@ -41,7 +41,7 @@ private ColorPickerEventArgs(SwatchColorType colorType, Color? color) public Color? RGBColor { get; private set;} /// - /// + /// Creates a ColorPickerEventArgs from ExecuteEventArgs of a RibbonDropDownColorPicker event /// /// Parameters from event: ExecuteEventArgs /// diff --git a/Ribbon/Controls/Events/FontControlEventArgs.cs b/Ribbon/Controls/Events/FontControlEventArgs.cs index 8ed6096..bebe4b4 100644 --- a/Ribbon/Controls/Events/FontControlEventArgs.cs +++ b/Ribbon/Controls/Events/FontControlEventArgs.cs @@ -19,10 +19,10 @@ public sealed class FontControlEventArgs : EventArgs /// /// /// - private FontControlEventArgs(FontPropertyStore currentFontStore, Dictionary changedValues) + private FontControlEventArgs(FontPropertyStore currentFontStore, Dictionary changedValues) { CurrentFontStore = currentFontStore; - ChangedValues = changedValues; + ChangedFontValues = changedValues; } /// @@ -32,13 +32,13 @@ private FontControlEventArgs(FontPropertyStore currentFontStore, Dictionary /// The changed values, can be null - /// Key is a String that is defined in RibbonProperties.cs for the Font control properties - /// like FontProperties_Family, FontProperties_Size, ... + /// Key is an enum for the Font control properties defined at the end of this class + /// like Family, Size, ... /// - public Dictionary ChangedValues { get; private set; } + public Dictionary ChangedFontValues { get; private set; } /// - /// + /// Creates a FontControlEventArgs from ExecuteEventArgs of a RibbonFontControl event /// /// Parameters from event: ExecuteEventArgs /// @@ -66,16 +66,16 @@ public static FontControlEventArgs Create(ref PropertyKey key, ref PropVariant c currentStore = (IPropertyStore)currentValue.Value; fontStore = new FontPropertyStore(currentStore); } - Dictionary keys = null; + Dictionary keys = null; PropVariant varChanges; if (commandExecutionProperties != null) { hr = commandExecutionProperties.GetValue(RibbonProperties.FontProperties_ChangedProperties, out varChanges); if (varChanges.VarType != VarEnum.VT_EMPTY) { - keys = new Dictionary(); + keys = new Dictionary(); IPropertyStore store = (IPropertyStore)varChanges.Value; - Solution1(store, keys); + Solution11(store, keys); PropVariant.UnsafeNativeMethods.PropVariantClear(ref varChanges); } } @@ -83,7 +83,129 @@ public static FontControlEventArgs Create(ref PropertyKey key, ref PropVariant c return e; } - private static void Solution1(IPropertyStore store, Dictionary keys) + //private static void Solution1(IPropertyStore store, Dictionary keys) + //{ + // HRESULT hr; + // uint count; + // PropVariant value = default(PropVariant); + // object propValue; + // store.GetCount(out count); + // for (uint i = 0; i < count; i++) + // { + // PropertyKey key; + // hr = store.GetAt(i, out key); + // if (key == RibbonProperties.FontProperties_Family) + // { + // hr = store.GetValue(RibbonProperties.FontProperties_Family, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (string)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Family), propValue); + // } + // } + // else if (key == RibbonProperties.FontProperties_Size) + // { + // hr = store.GetValue(RibbonProperties.FontProperties_Size, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (decimal)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Size), propValue); + // } + // } + // else if (key == RibbonProperties.FontProperties_Bold) + // { + // hr = store.GetValue(RibbonProperties.FontProperties_Bold, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (FontProperties)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Bold), propValue); + // } + // } + // else if (key == RibbonProperties.FontProperties_Italic) + // { + // hr = store.GetValue(RibbonProperties.FontProperties_Italic, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (FontProperties)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Italic), propValue); + // } + // } + // else if (key == RibbonProperties.FontProperties_Underline) + // { + // hr = store.GetValue(RibbonProperties.FontProperties_Underline, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (FontUnderline)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Underline), propValue); + // } + // } + // else if (key == RibbonProperties.FontProperties_Strikethrough) + // { + // hr = store.GetValue(RibbonProperties.FontProperties_Strikethrough, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (FontProperties)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Strikethrough), propValue); + // } + // } + // else if (key == RibbonProperties.FontProperties_ForegroundColor) + // { + // hr = store.GetValue(RibbonProperties.FontProperties_ForegroundColor, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = ColorTranslator.FromWin32((int)(uint)value.Value); + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_ForegroundColor), propValue); + // } + // } + // else if (key == RibbonProperties.FontProperties_BackgroundColor) + // { + // hr = store.GetValue(RibbonProperties.FontProperties_BackgroundColor, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = ColorTranslator.FromWin32((int)(uint)value.Value); + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_BackgroundColor), propValue); + // } + // } + // else if (key == RibbonProperties.FontProperties_ForegroundColorType) + // { + // hr = store.GetValue(RibbonProperties.FontProperties_ForegroundColorType, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (SwatchColorType)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_ForegroundColorType), propValue); + // } + // } + // else if (key == RibbonProperties.FontProperties_BackgroundColorType) + // { + // hr = store.GetValue(RibbonProperties.FontProperties_BackgroundColorType, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (SwatchColorType)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_BackgroundColorType), propValue); + // } + // } + // else if (key == RibbonProperties.FontProperties_VerticalPositioning) + // { + // hr = store.GetValue(RibbonProperties.FontProperties_VerticalPositioning, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (FontVerticalPosition)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_VerticalPositioning), propValue); + // } + // } + // else if (key == RibbonProperties.FontProperties_DeltaSize) + // { + // hr = store.GetValue(RibbonProperties.FontProperties_DeltaSize, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (FontDeltaSize)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_DeltaSize), propValue); + // } + // } + // } + //} + + private static void Solution11(IPropertyStore store, Dictionary keys) { HRESULT hr; uint count; @@ -100,7 +222,7 @@ private static void Solution1(IPropertyStore store, Dictionary k if (hr == HRESULT.S_OK) { propValue = (string)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Family), propValue); + keys.Add(FontPropertiesEnum.Family, propValue); } } else if (key == RibbonProperties.FontProperties_Size) @@ -109,7 +231,7 @@ private static void Solution1(IPropertyStore store, Dictionary k if (hr == HRESULT.S_OK) { propValue = (decimal)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Size), propValue); + keys.Add(FontPropertiesEnum.Size, propValue); } } else if (key == RibbonProperties.FontProperties_Bold) @@ -117,8 +239,8 @@ private static void Solution1(IPropertyStore store, Dictionary k hr = store.GetValue(RibbonProperties.FontProperties_Bold, out value); if (hr == HRESULT.S_OK) { - propValue = (FontProperties)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Bold), propValue); + propValue = (FontPropertiesEnum)(uint)value.Value; + keys.Add(FontPropertiesEnum.Bold, propValue); } } else if (key == RibbonProperties.FontProperties_Italic) @@ -126,8 +248,8 @@ private static void Solution1(IPropertyStore store, Dictionary k hr = store.GetValue(RibbonProperties.FontProperties_Italic, out value); if (hr == HRESULT.S_OK) { - propValue = (FontProperties)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Italic), propValue); + propValue = (FontPropertiesEnum)(uint)value.Value; + keys.Add(FontPropertiesEnum.Italic, propValue); } } else if (key == RibbonProperties.FontProperties_Underline) @@ -136,7 +258,7 @@ private static void Solution1(IPropertyStore store, Dictionary k if (hr == HRESULT.S_OK) { propValue = (FontUnderline)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Underline), propValue); + keys.Add(FontPropertiesEnum.Underline, propValue); } } else if (key == RibbonProperties.FontProperties_Strikethrough) @@ -144,8 +266,8 @@ private static void Solution1(IPropertyStore store, Dictionary k hr = store.GetValue(RibbonProperties.FontProperties_Strikethrough, out value); if (hr == HRESULT.S_OK) { - propValue = (FontProperties)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Strikethrough), propValue); + propValue = (FontPropertiesEnum)(uint)value.Value; + keys.Add(FontPropertiesEnum.Strikethrough, propValue); } } else if (key == RibbonProperties.FontProperties_ForegroundColor) @@ -154,7 +276,7 @@ private static void Solution1(IPropertyStore store, Dictionary k if (hr == HRESULT.S_OK) { propValue = ColorTranslator.FromWin32((int)(uint)value.Value); - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_ForegroundColor), propValue); + keys.Add(FontPropertiesEnum.ForegroundColor, propValue); } } else if (key == RibbonProperties.FontProperties_BackgroundColor) @@ -163,7 +285,7 @@ private static void Solution1(IPropertyStore store, Dictionary k if (hr == HRESULT.S_OK) { propValue = ColorTranslator.FromWin32((int)(uint)value.Value); - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_BackgroundColor), propValue); + keys.Add(FontPropertiesEnum.BackgroundColor, propValue); } } else if (key == RibbonProperties.FontProperties_ForegroundColorType) @@ -172,7 +294,7 @@ private static void Solution1(IPropertyStore store, Dictionary k if (hr == HRESULT.S_OK) { propValue = (SwatchColorType)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_ForegroundColorType), propValue); + keys.Add(FontPropertiesEnum.ForegroundColorType, propValue); } } else if (key == RibbonProperties.FontProperties_BackgroundColorType) @@ -181,7 +303,7 @@ private static void Solution1(IPropertyStore store, Dictionary k if (hr == HRESULT.S_OK) { propValue = (SwatchColorType)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_BackgroundColorType), propValue); + keys.Add(FontPropertiesEnum.BackgroundColorType, propValue); } } else if (key == RibbonProperties.FontProperties_VerticalPositioning) @@ -190,7 +312,7 @@ private static void Solution1(IPropertyStore store, Dictionary k if (hr == HRESULT.S_OK) { propValue = (FontVerticalPosition)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_VerticalPositioning), propValue); + keys.Add(FontPropertiesEnum.VerticalPositioning, propValue); } } else if (key == RibbonProperties.FontProperties_DeltaSize) @@ -199,89 +321,110 @@ private static void Solution1(IPropertyStore store, Dictionary k if (hr == HRESULT.S_OK) { propValue = (FontDeltaSize)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_DeltaSize), propValue); + keys.Add(FontPropertiesEnum.DeltaSize, propValue); } } } } - private static void Solution2(IPropertyStore store, Dictionary keys) - { - HRESULT hr; - object propValue; - PropVariant value = default(PropVariant); - hr = store.GetValue(RibbonProperties.FontProperties_BackgroundColor, out value); - if (hr == HRESULT.S_OK) - { - propValue = ColorTranslator.FromWin32((int)(uint)value.Value); - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_BackgroundColor), propValue); - } - hr = store.GetValue(RibbonProperties.FontProperties_BackgroundColorType, out value); - if (hr == HRESULT.S_OK) - { - propValue = (SwatchColorType)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_BackgroundColorType), propValue); - } - hr = store.GetValue(RibbonProperties.FontProperties_Bold, out value); - if (hr == HRESULT.S_OK) - { - propValue = (FontProperties)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Bold), propValue); - } - hr = store.GetValue(RibbonProperties.FontProperties_DeltaSize, out value); - if (hr == HRESULT.S_OK) - { - propValue = (FontDeltaSize)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_DeltaSize), propValue); - } - hr = store.GetValue(RibbonProperties.FontProperties_Family, out value); - if (hr == HRESULT.S_OK) - { - propValue = (string)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Family), propValue); - } - hr = store.GetValue(RibbonProperties.FontProperties_ForegroundColor, out value); - if (hr == HRESULT.S_OK) - { - propValue = ColorTranslator.FromWin32((int)(uint)value.Value); - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_ForegroundColor), propValue); - } - hr = store.GetValue(RibbonProperties.FontProperties_ForegroundColorType, out value); - if (hr == HRESULT.S_OK) - { - propValue = (SwatchColorType)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_ForegroundColorType), propValue); - } - hr = store.GetValue(RibbonProperties.FontProperties_Italic, out value); - if (hr == HRESULT.S_OK) - { - propValue = (FontProperties)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Italic), propValue); - } - hr = store.GetValue(RibbonProperties.FontProperties_Size, out value); - if (hr == HRESULT.S_OK) - { - propValue = (decimal)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Size), propValue); - } - hr = store.GetValue(RibbonProperties.FontProperties_Strikethrough, out value); - if (hr == HRESULT.S_OK) - { - propValue = (FontProperties)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Strikethrough), propValue); - } - hr = store.GetValue(RibbonProperties.FontProperties_Underline, out value); - if (hr == HRESULT.S_OK) - { - propValue = (FontUnderline)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Underline), propValue); - } - hr = store.GetValue(RibbonProperties.FontProperties_VerticalPositioning, out value); - if (hr == HRESULT.S_OK) - { - propValue = (FontVerticalPosition)(uint)value.Value; - keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_VerticalPositioning), propValue); - } - } + // private static void Solution2(IPropertyStore store, Dictionary keys) + // { + // HRESULT hr; + // object propValue; + // PropVariant value = default(PropVariant); + // hr = store.GetValue(RibbonProperties.FontProperties_BackgroundColor, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = ColorTranslator.FromWin32((int)(uint)value.Value); + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_BackgroundColor), propValue); + // } + // hr = store.GetValue(RibbonProperties.FontProperties_BackgroundColorType, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (SwatchColorType)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_BackgroundColorType), propValue); + // } + // hr = store.GetValue(RibbonProperties.FontProperties_Bold, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (FontProperties)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Bold), propValue); + // } + // hr = store.GetValue(RibbonProperties.FontProperties_DeltaSize, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (FontDeltaSize)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_DeltaSize), propValue); + // } + // hr = store.GetValue(RibbonProperties.FontProperties_Family, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (string)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Family), propValue); + // } + // hr = store.GetValue(RibbonProperties.FontProperties_ForegroundColor, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = ColorTranslator.FromWin32((int)(uint)value.Value); + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_ForegroundColor), propValue); + // } + // hr = store.GetValue(RibbonProperties.FontProperties_ForegroundColorType, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (SwatchColorType)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_ForegroundColorType), propValue); + // } + // hr = store.GetValue(RibbonProperties.FontProperties_Italic, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (FontProperties)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Italic), propValue); + // } + // hr = store.GetValue(RibbonProperties.FontProperties_Size, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (decimal)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Size), propValue); + // } + // hr = store.GetValue(RibbonProperties.FontProperties_Strikethrough, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (FontProperties)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Strikethrough), propValue); + // } + // hr = store.GetValue(RibbonProperties.FontProperties_Underline, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (FontUnderline)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_Underline), propValue); + // } + // hr = store.GetValue(RibbonProperties.FontProperties_VerticalPositioning, out value); + // if (hr == HRESULT.S_OK) + // { + // propValue = (FontVerticalPosition)(uint)value.Value; + // keys.Add(RibbonProperties.GetPropertyKeyName(ref RibbonProperties.FontProperties_VerticalPositioning), propValue); + // } + // } + } + +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + + public enum FontPropertiesEnum + { + None = 0, + Family = 301, + Size, + Bold, + Italic, + Underline, + Strikethrough, + VerticalPositioning, + ForegroundColor, + BackgroundColor, + ForegroundColorType, + BackgroundColorType, + ChangedProperties, + DeltaSize, } +#pragma warning restore CS1591 } diff --git a/Ribbon/Controls/Events/GalleryItemEventArgs.cs b/Ribbon/Controls/Events/GalleryItemEventArgs.cs index 3be59b4..2b79741 100644 --- a/Ribbon/Controls/Events/GalleryItemEventArgs.cs +++ b/Ribbon/Controls/Events/GalleryItemEventArgs.cs @@ -26,7 +26,7 @@ private GalleryItemEventArgs(SelectedItem selected) public SelectedItem SelectedItem { get; private set; } /// - /// + /// Creates a GalleryItemEventArgs from ExecuteEventArgs of a Ribbon Gallery Control (RibbonComboBox, ...) event /// /// Parameters from event: ExecuteEventArgs /// diff --git a/Ribbon/Controls/Events/RecentItemsEventArgs.cs b/Ribbon/Controls/Events/RecentItemsEventArgs.cs index 6ed63da..71ce6d0 100644 --- a/Ribbon/Controls/Events/RecentItemsEventArgs.cs +++ b/Ribbon/Controls/Events/RecentItemsEventArgs.cs @@ -48,7 +48,7 @@ private RecentItemsEventArgs(SelectedItem selected, ILis public IList OldRecentItems { get; private set; } /// - /// + /// Creates a RecentItemsEventArgs from ExecuteEventArgs of a RibbonRecentItems event /// /// Parameters from event: sender = RibbonControl /// Parameters from event: ExecuteEventArgs diff --git a/Samples/CS/NewFunctions/RibbonItems.cs b/Samples/CS/NewFunctions/RibbonItems.cs index 7137ab8..a9245ee 100644 --- a/Samples/CS/NewFunctions/RibbonItems.cs +++ b/Samples/CS/NewFunctions/RibbonItems.cs @@ -158,14 +158,14 @@ private void InitRecentItems() private void FontPicker_ExecuteEvent(object sender, ExecuteEventArgs e) { FontControlEventArgs args = FontControlEventArgs.Create(e); - Dictionary changedFontValues = args.ChangedValues; + Dictionary changedFontValues = args.ChangedFontValues; FontPropertyStore store = args.CurrentFontStore; } private void FontPicker_PreviewEvent(object sender, ExecuteEventArgs e) { FontControlEventArgs args = FontControlEventArgs.Create(e); - Dictionary changedFont = args.ChangedValues; + Dictionary changedFont = args.ChangedFontValues; FontPropertyStore store = args.CurrentFontStore; FontDeltaSize? dSize = store.DeltaSize; } @@ -173,7 +173,7 @@ private void FontPicker_PreviewEvent(object sender, ExecuteEventArgs e) private void FontPicker_CancelPreviewEvent(object sender, ExecuteEventArgs e) { FontControlEventArgs args = FontControlEventArgs.Create(e); - Dictionary changedFont = args.ChangedValues; + Dictionary changedFont = args.ChangedFontValues; FontPropertyStore store = args.CurrentFontStore; }