diff --git a/.build/.build.csproj b/.build/.build.csproj
index 531dfc708..1b5b221b8 100644
--- a/.build/.build.csproj
+++ b/.build/.build.csproj
@@ -11,8 +11,8 @@
-
-
+
+
diff --git a/.build/Build.cs b/.build/Build.cs
index ac5a8c02a..6d4b44c63 100644
--- a/.build/Build.cs
+++ b/.build/Build.cs
@@ -45,7 +45,7 @@ protected override void OnBuildInitialized()
[Solution(GenerateProjects = true)] readonly Solution Solution = null!;
- [GitVersion(Framework = "netcoreapp3.1", NoFetch = true)] readonly GitVersion? GitVersion;
+ [GitVersion(Framework = "net6.0", NoFetch = true)] readonly GitVersion? GitVersion;
string AssemblySemVer => GitVersion?.AssemblySemVer ?? "1.0.0";
string SemVer => GitVersion?.SemVer ?? "1.0.0";
@@ -69,7 +69,7 @@ protected override void OnBuildInitialized()
Target CleanOutput => _ => _
.Executes(() =>
{
- EnsureCleanDirectory(ArtifactsDirectory);
+ ArtifactsDirectory.CreateOrCleanDirectory();
});
Target Restore => _ => _
@@ -121,15 +121,15 @@ protected override void OnBuildInitialized()
.SetFileVersion(AssemblySemFileVer)
.SetInformationalVersion(InformationalVersion));
- Compress(BuildBinDirectory / "Fluent.Ribbon" / Configuration, ArtifactsDirectory / $"Fluent.Ribbon-v{NuGetVersion}.zip");
- Compress(BuildBinDirectory / "Fluent.Ribbon.Showcase" / Configuration, ArtifactsDirectory / $"Fluent.Ribbon.Showcase-v{NuGetVersion}.zip");
+ (BuildBinDirectory / "Fluent.Ribbon" / Configuration).CompressTo(ArtifactsDirectory / $"Fluent.Ribbon-v{NuGetVersion}.zip");
+ (BuildBinDirectory / "Fluent.Ribbon.Showcase" / Configuration).CompressTo(ArtifactsDirectory / $"Fluent.Ribbon.Showcase-v{NuGetVersion}.zip");
});
Target Test => _ => _
.After(Compile)
.Executes(() =>
{
- EnsureCleanDirectory(TestResultsDir);
+ TestResultsDir.CreateOrCleanDirectory();
DotNetTest(_ => _
.SetConfiguration(Configuration)
diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index c3a0dc984..aeca3beac 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"xamlstyler.console": {
- "version": "3.2008.4",
+ "version": "3.2206.4",
"commands": [
"xstyler"
]
diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json
index c8bfde9ac..19d876369 100644
--- a/.nuke/build.schema.json
+++ b/.nuke/build.schema.json
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
- "title": "Build Schema",
"$ref": "#/definitions/build",
+ "title": "Build Schema",
"definitions": {
"build": {
"type": "object",
@@ -122,4 +122,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/Build.ps1 b/Build.ps1
index 61754e898..301a0b1bf 100644
--- a/Build.ps1
+++ b/Build.ps1
@@ -18,7 +18,7 @@ $TempDirectory = "$PSScriptRoot\\.nuke\temp"
$DotNetGlobalFile = "$PSScriptRoot\\global.json"
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
-$DotNetChannel = "Current"
+$DotNetChannel = "STS"
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
@@ -56,14 +56,19 @@ else {
# Install by channel or version
$DotNetDirectory = "$TempDirectory\dotnet-win"
if (!(Test-Path variable:DotNetVersion)) {
- ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
+ ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
} else {
- ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
+ ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
}
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
}
-Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)"
+Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)"
+
+if (Test-Path env:NUKE_ENTERPRISE_TOKEN) {
+ & $env:DOTNET_EXE nuget remove source "nuke-enterprise" > $null
+ & $env:DOTNET_EXE nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password $env:NUKE_ENTERPRISE_TOKEN > $null
+}
ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }
diff --git a/Changelog.md b/Changelog.md
index 14b3759f3..544e8027f 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,5 +1,16 @@
# Changelog for Fluent.Ribbon
+## 10.0.1
+
+- ### Bug fixes
+
+ - [#1133](../../issues/1133) - Fixing binding path to attached property for simplified ControlTemplates (thanks @dcm99)
+ - [#1134](../../issues/1134) - Selected Tab on first render has a black border
+ - [#1135](../../issues/1135) - Black line between Ribbon and Window (when using a colorful theme)
+ - [#1125](../../issues/1125) - BackStage Back Button doesn't have an accessibility text.
+ - [#1151](../../issues/1151) - ComboBox Popup MinWidth too large
+ - [#1152](../../issues/1152) - Using ObjectToImageConverter via StaticResource raises an exception (thanks @nishy2000)
+
## 10.0.0
- ### Breaking changes
@@ -21,6 +32,7 @@
Minimize button was moved to the right hand side of the toolbar in the tab item row
- All resources now have the prefix `Fluent.Ribbon.`.
This means that nearly all resources got renamed.
+ - `InputWidth` was converted from an instance proptery to an attached property in `InputControlProperties`
- ### Bug fixes
diff --git a/Directory.build.props b/Directory.build.props
index 7b02e6ba9..5057de4a7 100644
--- a/Directory.build.props
+++ b/Directory.build.props
@@ -10,6 +10,8 @@
true
true
+ false
+ true
diff --git a/Directory.packages.props b/Directory.packages.props
index 9d784c9c6..211eaf506 100644
--- a/Directory.packages.props
+++ b/Directory.packages.props
@@ -5,12 +5,12 @@
-
+
-
+
@@ -20,11 +20,11 @@
-
+
-
-
+
+
\ No newline at end of file
diff --git a/Fluent.Ribbon.Showcase/TestContent.xaml b/Fluent.Ribbon.Showcase/TestContent.xaml
index 8e3def347..29b7f64da 100644
--- a/Fluent.Ribbon.Showcase/TestContent.xaml
+++ b/Fluent.Ribbon.Showcase/TestContent.xaml
@@ -3588,6 +3588,9 @@
+
+
+
+
+ ObjectToImageConverter for issue #1152
+
+
diff --git a/Fluent.Ribbon.Tests/Converters/ObjectToImageConverterTests.cs b/Fluent.Ribbon.Tests/Converters/ObjectToImageConverterTests.cs
index ee7858968..646e12535 100644
--- a/Fluent.Ribbon.Tests/Converters/ObjectToImageConverterTests.cs
+++ b/Fluent.Ribbon.Tests/Converters/ObjectToImageConverterTests.cs
@@ -41,4 +41,35 @@ public void TestDynamicResource()
Assert.That(drawingGroup.Children.Cast().Select(x => x.Geometry.ToString()),
Is.EquivalentTo(((DrawingGroup)((DrawingImage)Application.Current.FindResource(fluentRibbonImagesApplicationmenuResourceKey)).Drawing).Children.Cast().Select(x => x.Geometry.ToString())));
}
-}
\ No newline at end of file
+
+ private class DummyProvider : IServiceProvider
+ {
+ object IServiceProvider.GetService(Type serviceType)
+ {
+ return null;
+ }
+ }
+
+ [Test]
+ public void TestStaticResourceSequnece()
+ {
+ var fluentRibbonImagesApplicationmenuResourceKey = (object)"Fluent.Ribbon.Images.ApplicationMenu";
+
+ var expressionType = typeof(ResourceReferenceExpressionConverter).Assembly.GetType("System.Windows.ResourceReferenceExpression");
+
+ var expression = Activator.CreateInstance(expressionType, fluentRibbonImagesApplicationmenuResourceKey);
+
+ var converter = new ObjectToImageConverter();
+
+ converter.ProvideValue(new DummyProvider());
+
+ var convertedValue = StaticConverters.ObjectToImageConverter.Convert(new object[]
+ {
+ expression, // value to convert
+ new ApplicationMenu() // target visual
+ }, null, null, null);
+
+ Assert.That(convertedValue, Is.Not.Null);
+ Assert.That(convertedValue, Is.InstanceOf());
+ }
+}
diff --git a/Fluent.Ribbon/Controls/RibbonTabControl.cs b/Fluent.Ribbon/Controls/RibbonTabControl.cs
index ab0ecf7d8..2a4c4e335 100644
--- a/Fluent.Ribbon/Controls/RibbonTabControl.cs
+++ b/Fluent.Ribbon/Controls/RibbonTabControl.cs
@@ -867,7 +867,10 @@ public void SelectFirstTab()
this.SelectedItem = this.GetFirstVisibleItem();
}
- this.SelectedTabItem?.Focus();
+ if (this.IsKeyboardFocusWithin)
+ {
+ this.SelectedTabItem?.Focus();
+ }
}
// Handles IsMinimized changed
diff --git a/Fluent.Ribbon/Converters/ObjectToImageConverter.cs b/Fluent.Ribbon/Converters/ObjectToImageConverter.cs
index 94ce9d370..d4a15eeaa 100644
--- a/Fluent.Ribbon/Converters/ObjectToImageConverter.cs
+++ b/Fluent.Ribbon/Converters/ObjectToImageConverter.cs
@@ -224,6 +224,11 @@ public override object ProvideValue(IServiceProvider serviceProvider)
private object CreateMultiBinding(IServiceProvider serviceProvider)
{
+ if (this.IconBinding is null)
+ {
+ return this;
+ }
+
var multiBinding = new MultiBinding
{
Converter = this
diff --git a/Fluent.Ribbon/Helpers/FrameworkHelper.cs b/Fluent.Ribbon/Helpers/FrameworkHelper.cs
index 1f5b2429f..de129ddc4 100644
--- a/Fluent.Ribbon/Helpers/FrameworkHelper.cs
+++ b/Fluent.Ribbon/Helpers/FrameworkHelper.cs
@@ -43,7 +43,6 @@ public static void SetUseLayoutRounding(DependencyObject obj, bool value)
private static void OnUseLayoutRoundingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
d.SetCurrentValue(UIElement.SnapsToDevicePixelsProperty, BooleanBoxes.TrueBox);
- RenderOptions.SetClearTypeHint(d, ClearTypeHint.Enabled);
d.SetCurrentValue(FrameworkElement.UseLayoutRoundingProperty, BooleanBoxes.TrueBox);
}
}
\ No newline at end of file
diff --git a/Fluent.Ribbon/Themes/Controls/BackstageTabControl.xaml b/Fluent.Ribbon/Themes/Controls/BackstageTabControl.xaml
index f8f2b2f7f..4254cf4db 100644
--- a/Fluent.Ribbon/Themes/Controls/BackstageTabControl.xaml
+++ b/Fluent.Ribbon/Themes/Controls/BackstageTabControl.xaml
@@ -203,6 +203,7 @@
Grid.Row="0"
Padding="22 7 0 7"
VerticalAlignment="Top"
+ AutomationProperties.Name="{Binding Uid, RelativeSource={RelativeSource Self}}"
Command="{x:Static Fluent:RibbonCommands.OpenBackstage}"
Visibility="{Binding Path=IsBackButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Fluent.Ribbon.Converters.BoolToVisibilityConverter}}">
diff --git a/Fluent.Ribbon/Themes/Controls/Button.xaml b/Fluent.Ribbon/Themes/Controls/Button.xaml
index ebdd8a1d2..a6d7b8354 100644
--- a/Fluent.Ribbon/Themes/Controls/Button.xaml
+++ b/Fluent.Ribbon/Themes/Controls/Button.xaml
@@ -140,7 +140,7 @@
HorizontalAlignment="Center"
VerticalAlignment="Center">
diff --git a/Fluent.Ribbon/Themes/Controls/ComboBox.xaml b/Fluent.Ribbon/Themes/Controls/ComboBox.xaml
index ec8bb84c7..598bd349b 100644
--- a/Fluent.Ribbon/Themes/Controls/ComboBox.xaml
+++ b/Fluent.Ribbon/Themes/Controls/ComboBox.xaml
@@ -187,9 +187,9 @@
diff --git a/Fluent.Ribbon/Themes/Controls/DropDownButton.xaml b/Fluent.Ribbon/Themes/Controls/DropDownButton.xaml
index 08c593fff..014ece916 100644
--- a/Fluent.Ribbon/Themes/Controls/DropDownButton.xaml
+++ b/Fluent.Ribbon/Themes/Controls/DropDownButton.xaml
@@ -222,7 +222,7 @@
HorizontalAlignment="Center"
VerticalAlignment="Center">
diff --git a/Fluent.Ribbon/Themes/Controls/InRibbonGallery.xaml b/Fluent.Ribbon/Themes/Controls/InRibbonGallery.xaml
index c8909d347..e717bcb3c 100644
--- a/Fluent.Ribbon/Themes/Controls/InRibbonGallery.xaml
+++ b/Fluent.Ribbon/Themes/Controls/InRibbonGallery.xaml
@@ -172,7 +172,7 @@
HorizontalAlignment="Center"
VerticalAlignment="Center">
diff --git a/Fluent.Ribbon/Themes/Controls/RibbonGroupBox.xaml b/Fluent.Ribbon/Themes/Controls/RibbonGroupBox.xaml
index 3f78045d3..0b2e3a52b 100644
--- a/Fluent.Ribbon/Themes/Controls/RibbonGroupBox.xaml
+++ b/Fluent.Ribbon/Themes/Controls/RibbonGroupBox.xaml
@@ -529,7 +529,7 @@
VerticalAlignment="Center"
IsHitTestVisible="False">
diff --git a/Fluent.Ribbon/Themes/Controls/SplitButton.xaml b/Fluent.Ribbon/Themes/Controls/SplitButton.xaml
index 379a73484..1f87b3a9f 100644
--- a/Fluent.Ribbon/Themes/Controls/SplitButton.xaml
+++ b/Fluent.Ribbon/Themes/Controls/SplitButton.xaml
@@ -458,7 +458,7 @@
HorizontalAlignment="Center"
VerticalAlignment="Center">
diff --git a/Fluent.Ribbon/Themes/Controls/ToggleButton.xaml b/Fluent.Ribbon/Themes/Controls/ToggleButton.xaml
index c8e414830..193e38922 100644
--- a/Fluent.Ribbon/Themes/Controls/ToggleButton.xaml
+++ b/Fluent.Ribbon/Themes/Controls/ToggleButton.xaml
@@ -153,7 +153,7 @@
VerticalAlignment="Center">
diff --git a/Fluent.Ribbon/Themes/RibbonWindow.xaml b/Fluent.Ribbon/Themes/RibbonWindow.xaml
index 59303ce44..5ee4260e9 100644
--- a/Fluent.Ribbon/Themes/RibbonWindow.xaml
+++ b/Fluent.Ribbon/Themes/RibbonWindow.xaml
@@ -20,6 +20,7 @@
/dev/null || true
+ "$DOTNET_EXE" nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password "$NUKE_ENTERPRISE_TOKEN" --store-password-in-clear-text &>/dev/null || true
+fi
"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"