Skip to content

Commit aaeb5fb

Browse files
committed
Merge branch 'develop'
2 parents 379d05d + 08c5312 commit aaeb5fb

File tree

182 files changed

+7143
-4220
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+7143
-4220
lines changed

.build/.build.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<RootNamespace />
66
<NoWarn>CS0649;CS0169</NoWarn>
77
<NukeRootDirectory>..</NukeRootDirectory>
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Nuke.Common" Version="7.0.6" />
14+
<PackageReference Include="Nuke.Common" Version="8.0.0" />
1515
<PackageDownload Include="GitVersion.Tool" Version="[5.12.0]" />
1616
</ItemGroup>
1717

.build/.build.csproj.DotSettings

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_ANONYMOUSMETHOD_ON_SINGLE_LINE/@EntryValue">False</s:Boolean>
1717
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
1818
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
19+
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=4a98fdf6_002D7d98_002D4f5a_002Dafeb_002Dea44ad98c70c/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="FIELD" /&gt;&lt;Kind Name="READONLY_FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String>
20+
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=f9fce829_002De6f4_002D4cb2_002D80f1_002D5497c44f51df/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static" AccessRightKinds="Private" Description="Static fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String>
1921
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean>
2022
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
2123
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
@@ -24,4 +26,5 @@
2426
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
2527
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
2628
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
27-
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
29+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
30+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EPredefinedNamingRulesToUserRulesUpgrade/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

.build/Build.cs

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using GlobExpressions;
1+
// ReSharper disable AllUnderscoreLocalParameterName
2+
23
using Nuke.Common;
34
using Nuke.Common.IO;
45
using Nuke.Common.ProjectModel;
@@ -40,9 +41,11 @@ protected override void OnBuildInitialized()
4041
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
4142
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
4243

43-
[Solution(GenerateProjects = true)] readonly Solution Solution = null!;
44+
[Solution(GenerateProjects = true)]
45+
readonly Solution Solution = null!;
4446

45-
[GitVersion(Framework = "net6.0", NoFetch = true)] readonly GitVersion? GitVersion;
47+
[GitVersion(Framework = "net6.0", NoFetch = true)]
48+
readonly GitVersion? GitVersion;
4649

4750
string AssemblySemVer => GitVersion?.AssemblySemVer ?? "1.0.0";
4851
string SemVer => GitVersion?.SemVer ?? "1.0.0";
@@ -97,7 +100,7 @@ protected override void OnBuildInitialized()
97100
.SetFileVersion(AssemblySemVer)
98101
.SetInformationalVersion(InformationalVersion)
99102

100-
.SetVerbosity(DotNetVerbosity.Minimal));
103+
.SetVerbosity(DotNetVerbosity.minimal));
101104
});
102105

103106
Target Pack => _ => _
@@ -135,42 +138,31 @@ protected override void OnBuildInitialized()
135138
.EnableNoRestore()
136139
.AddLoggers("trx")
137140
.SetResultsDirectory(TestResultsDir)
138-
.SetVerbosity(DotNetVerbosity.Normal));
141+
.SetVerbosity(DotNetVerbosity.normal));
139142
});
140143

141-
Target FixResourceKeys => _ => _
142-
.DependsOn(Compile)
143-
.Executes(() =>
144-
{
145-
var resourceKeys = new ResourceKeys(FluentRibbonDirectory / "Themes" / "Styles.xaml", FluentRibbonDirectory / "Themes" / "Themes" / "Theme.Template.xaml");
146-
147-
Serilog.Log.Information($"Peeked keys : {resourceKeys.PeekedKeys.Count}");
148-
149-
Serilog.Log.Information($"Filtered keys: {resourceKeys.ElementsWithNonTypeKeys.Count}");
150-
151-
//resourceKeys.CheckKeys();
152-
153-
resourceKeys.FixKeys(Glob.Files(FluentRibbonDirectory / "Themes", "**/*.{xaml,json}").Select(x => Path.Combine(FluentRibbonDirectory / "Themes", x)).ToArray());
154-
});
155-
144+
// ReSharper disable once UnusedMember.Local
156145
Target ResourceKeys => _ => _
157146
.After(Compile)
158147
.Executes(() =>
159148
{
160149
var resourceKeys = new ResourceKeys(FluentRibbonDirectory / "Themes" / "Styles.xaml", FluentRibbonDirectory / "Themes" / "Themes" / "Theme.Template.xaml");
161150

162-
Serilog.Log.Information($"Peeked keys : {resourceKeys.PeekedKeys.Count}");
163-
164-
Serilog.Log.Information($"Filtered keys: {resourceKeys.ElementsWithNonTypeKeys.Count}");
165-
166151
var vNextResourceKeys = resourceKeys.ElementsWithNonTypeKeys
167152
.Select(x => x.Key)
168153
.Distinct()
169154
.OrderBy(x => x)
170155
.ToList();
171156

157+
Serilog.Log.Information($"Peeked keys : {resourceKeys.PeekedKeys.Count}");
158+
Serilog.Log.Information($"Filtered keys: {resourceKeys.ElementsWithNonTypeKeys.Count}");
172159
Serilog.Log.Information($"Distinct keys: {vNextResourceKeys.Count}");
173160

161+
if (resourceKeys.CheckKeys() is false)
162+
{
163+
Assert.Fail("Wrong resource keys found.");
164+
}
165+
174166
File.WriteAllLines(ReferenceDataDir / "vNextResourceKeys.txt", vNextResourceKeys, Encoding.UTF8);
175167

176168
var vCurrentResourceKeys = File.ReadAllLines(ReferenceDataDir / "vCurrentResourceKeys.txt", Encoding.UTF8);
@@ -193,7 +185,6 @@ protected override void OnBuildInitialized()
193185
});
194186

195187
// ReSharper disable once UnusedMember.Local
196-
// ReSharper disable once InconsistentNaming
197188
Target CI => _ => _
198189
.DependsOn(Compile)
199190
.DependsOn(Test)

.build/Directory.Build.props

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44
<!-- This file prevents unintended imports of unrelated MSBuild files -->
55
<!-- Uncomment to include parent Directory.Build.props file -->
66
<!--<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />-->
7-
7+
<PropertyGroup>
8+
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
9+
</PropertyGroup>
810
</Project>

.build/ResourceKeys.cs

Lines changed: 14 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ public ResourceKeys(params string[] sourceFiles)
3838

3939
public IReadOnlyList<(XElement Element, string Key)> ElementsWithNonTypeKeys { get; }
4040

41-
public IEnumerable<(string Key, string expectedKey)> CheckKeys()
41+
public bool CheckKeys()
4242
{
43+
var result = true;
44+
4345
foreach (var elementWithNonTypeKey in this.ElementsWithNonTypeKeys)
4446
{
4547
var requiredPrefix = GetFullPrefix(elementWithNonTypeKey.Element.Name);
@@ -52,10 +54,11 @@ public ResourceKeys(params string[] sourceFiles)
5254

5355
var expectedKey = BuildExpectedKey(requiredPrefix, elementWithNonTypeKey.Key);
5456

55-
//Serilog.Log.Warning($"Wrong key.{Environment.NewLine}Current : {elementWithNonTypeKey.Key}{Environment.NewLine}Expected: {expectedKey}");
56-
57-
yield return (elementWithNonTypeKey.Key, expectedKey);
57+
Serilog.Log.Error($"Wrong key.{Environment.NewLine}Current : {elementWithNonTypeKey.Key}{Environment.NewLine}Expected: {expectedKey}");
58+
result = false;
5859
}
60+
61+
return result;
5962
}
6063

6164
string BuildExpectedKey(string requiredPrefix, string key)
@@ -98,7 +101,6 @@ static string BuildKey(string key)
98101
static string GetPrefixPart(XName name) =>
99102
name.LocalName switch
100103
{
101-
"Thickness" => "Values",
102104
"ApplicationMenuRightScrollViewerExtractorConverter" => "Converters",
103105
"Storyboard" => "Storyboards",
104106
"Style" => "Styles",
@@ -109,43 +111,15 @@ static string GetPrefixPart(XName name) =>
109111
"BooleanToVisibilityConverter" => "Converters",
110112
"MenuScrollingVisibilityConverter" => "Converters",
111113
"DrawingImage" => "Images",
112-
"String" => "Values",
113114
"Color" => "Colors",
114115
"SolidColorBrush" => "Brushes",
115-
"Boolean" => "Values",
116116
"LinearGradientBrush" => "Brushes",
117-
_ => throw new ArgumentOutOfRangeException(nameof(name), name, null)
117+
"Thickness" => "Values",
118+
"String" => "Values",
119+
"Boolean" => "Values",
120+
"CornerRadius" => "Values",
121+
"DropShadowEffect" => "Values",
122+
"PathGeometry" => "Values",
123+
_ => throw new ArgumentOutOfRangeException(nameof(name), name.LocalName, null)
118124
};
119-
120-
public void FixKeys(params string[] targetFiles)
121-
{
122-
var keysToFix = this.CheckKeys()
123-
.ToArray();
124-
125-
if (keysToFix.Length == 0)
126-
{
127-
return;
128-
}
129-
130-
foreach (var targetFile in targetFiles)
131-
{
132-
Serilog.Log.Information(targetFile);
133-
134-
var content = File.ReadAllText(targetFile);
135-
var contentBefore = content;
136-
137-
foreach (var keyToFix in keysToFix)
138-
{
139-
content = content.Replace($"\"{keyToFix.Key}\"", $"\"{keyToFix.expectedKey}\"");
140-
content = content.Replace($" {keyToFix.Key}}}", $" {keyToFix.expectedKey}}}");
141-
content = content.Replace($" {keyToFix.Key}, ", $" {keyToFix.expectedKey}, ");
142-
content = content.Replace($"{{{keyToFix.Key}}}", $"{{{keyToFix.expectedKey}}}");
143-
}
144-
145-
if (contentBefore != content)
146-
{
147-
File.WriteAllText(targetFile, content, Encoding.UTF8);
148-
}
149-
}
150-
}
151125
}

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"xamlstyler.console": {
6-
"version": "3.2206.4",
6+
"version": "3.2404.2",
77
"commands": [
88
"xstyler"
99
]

.nuke/build.schema.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
"CI",
7979
"CleanOutput",
8080
"Compile",
81-
"FixResourceKeys",
8281
"Pack",
8382
"ResourceKeys",
8483
"Restore",
@@ -100,7 +99,6 @@
10099
"CI",
101100
"CleanOutput",
102101
"Compile",
103-
"FixResourceKeys",
104102
"Pack",
105103
"ResourceKeys",
106104
"Restore",

Changelog.md

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,87 @@
11
# Changelog for Fluent.Ribbon
22

3+
## 11.0.0 (preview)
4+
5+
- ### Breaking changes
6+
7+
- Dropped support for .NET 5.0 and .NET 3.1. Added .NET 6.0 and .NET 8.0 instead
8+
- **Aligned theming with current office versions**
9+
- `Backstage`
10+
- Removed default `MinWidth` on the button responsible for opening
11+
- Saving and restoring window sizes were removed
12+
- `BackstageTabControl`
13+
- `IsWindowSteeringHelperEnabled` and `SelectedContentMargin` were removed
14+
- `BackstageTabItem`
15+
- Selection now happens on left mouse button down instead of up
16+
- Selection now happens on focus retrieval instead of `Space` or `Enter` key press
17+
- `RibbonContextualTabGroup`
18+
- Width is now always the width of it's containing tabs
19+
- `RibbonGroupBox`
20+
- Changed default `Padding` from `0` to `0 4 0 0`
21+
- Removed method `ClearCache`
22+
- `RibbonTabItem`
23+
- Changed default `HeaderPadding` from `8 5 8 5` to `9 7 9 7`.<br/>
24+
`Padding` is gradually increased/decreased when the available space changes.<br/>
25+
Down to a minimum of `5` for left/right.
26+
- Replaced `IsSeparatorVisible` by `SeparatorOpacity`
27+
- Changed default `Padding` from `0` to `4 0 4 0`
28+
- `Padding` is now forwarded to the `Margin` of the content
29+
- Active border thickness (underline) can be changed by overwriting `Fluent.Ribbon.Values.RibbonTabItem.Active.BorderThickness`
30+
- Default `HeaderTemplate` now contains two `TextBlock`
31+
- `RibbonTabControl`
32+
- `PART_SelectedContentPresenter` was renamed to `PART_SelectedContent` and can be of type `FrameworkElement`.<br/>
33+
The default template uses the new `TransitioningControl`.<br/>
34+
The used transition can be changed by overwriting the resource `Fluent.Ribbon.Values.RibbonTabControl.Content.Transition`.
35+
- `DefaultContentGapHeight` changed from `1` to `3`
36+
- `DefaultContentHeight` changed from `94` to `100`
37+
- Corner radius for item display can be changed by `Fluent.Ribbon.Values.RibbonTabControl.Content.CornerRadius`
38+
- Drop shadow can be changed by overwriting `Fluent.Ribbon.Values.RibbonTabControl.Content.DropShadowEffect`
39+
- Content margin can be changed by overwriting `Fluent.Ribbon.Values.RibbonTabControl.Content.Margin`
40+
- `RibbonTitleBar`
41+
- Changed default `HideContextTabs` from `false` to `true`
42+
- `RibbonWindow`
43+
- Default `Background` is now `Fluent.Ribbon.Brushes.RibbonWindow.Background`
44+
- `ScreenTip`
45+
- Type for `Image` was changed from `ImageSource` to `object` to allow any image content
46+
- Type for `Text` was changed from `string` to `object` to allow rich content (see [#716](../../issues/716))
47+
- `DropDownButton`, `SplitButton` and `ApplicationMenu` don't generate `MenuItem` but `ContentPresenter` as containers.<br/>
48+
This provides more flexibility and also fixes the nested `MenuItem` issues.
49+
- Removed default style assignment for `ScrollBar`
50+
- Themes
51+
- All
52+
- Quite a few colors/brushes changed
53+
- Dark
54+
- `Fluent.Ribbon.Colors.White` changed from `#FF252525` to `#FF000000`
55+
56+
- ### Enhancements/Features
57+
58+
- Added `TabItemForeground` to `RibbonContextualTabGroup`
59+
- Added resource `Fluent.Ribbon.Brushes.RibbonWindow.Background`
60+
- Added `TransitioningControl` to animate content changes
61+
- Added `IsBackstageOrStartScreenOpen` on `Ribbon`
62+
- [#716](../../issues/716) - Unable to use rich content for ScreenTip
63+
- Changed text from `string` to `object` and added `TextTemplate` to `ScreenTip` to support this
64+
- [#719](../../issues/719) - Make StatusBarItems always visible
65+
- Added `IsCheckable` to `StatusBarItem` which defaults to `true`
66+
- `RibbonProperties`
67+
- Added `PressedBackground` (used in `Fluent.Ribbon.Styles.WindowCommands.CaptionButton` etc.)
68+
- Added `CornerRadius` (used for `RibbonTabControl`, `Fluent.Ribbon.Templates.ScrollButton` etc.)
69+
- Selecting an `RibbonTabItem` brings it into view now
70+
- Improved keyboard navigation inside `BackstageTabControl`
71+
- Improved mouse wheel selection on `RibbonTabControl`
72+
73+
- ### Bug fixes
74+
75+
- [#1162](../../issues/1162) - Maximum dropdown height is not screen aware
76+
- [#1196](../../issues/1196) - GroupName causes the selected ToggleButton to no longer trigger the click event
77+
- Value of `HideContextTabs` are now properly restored when `Backstage` is closed
78+
- `RibbonTitleBar`
79+
- Fixed rendering when `HideContextTabs` is `true`
80+
- Rendering now updates when QAT is shown/hidden
81+
- Opening `Backstage`/`StartScreen` now properly sets the focus to it's content (`BackstageTabControl`, `StartScreenTabControl` etc.)
82+
- Fixed mouse over for `Fluent.Ribbon.Templates.WindowCommands.CaptionButton`
83+
- Fixed selection events for `BackstageTabControl`, `BackstageTabItem`, `GalleryItem`, `InRibbonGallery`, `RibbonTabControl` and `RibbonTabItem`
84+
385
## 10.1.0
486

587
- ### Bug fixes
@@ -55,7 +137,6 @@
55137
- ### Breaking changes
56138

57139
- Dropped support for .NET 4.5.2. The lowest support .NET version is now 4.6.2.
58-
- Dropped support for .NET 5.0 and add .NET 6.0 instead.
59140
- Resizing popups should now work properly where supported (ComboBox, DropDownButton, InRibbonGallery, MenuItem, SplitButton).
60141
Templates now use the new specialized `ResizeableContentControl` to enable this.
61142
Resize code was moved from single controls to the new control.

0 commit comments

Comments
 (0)