Skip to content

Commit c17bb0f

Browse files
committed
Merge branch 'develop'
2 parents ee900fd + 41ea15b commit c17bb0f

25 files changed

+110
-36
lines changed

.build/.build.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Nuke.Common" Version="6.3.0" />
15-
<PackageDownload Include="GitVersion.Tool" Version="[5.6.3]" />
14+
<PackageReference Include="Nuke.Common" Version="7.0.2" />
15+
<PackageDownload Include="GitVersion.Tool" Version="[5.12.0]" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

.build/Build.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected override void OnBuildInitialized()
4545

4646
[Solution(GenerateProjects = true)] readonly Solution Solution = null!;
4747

48-
[GitVersion(Framework = "netcoreapp3.1", NoFetch = true)] readonly GitVersion? GitVersion;
48+
[GitVersion(Framework = "net6.0", NoFetch = true)] readonly GitVersion? GitVersion;
4949

5050
string AssemblySemVer => GitVersion?.AssemblySemVer ?? "1.0.0";
5151
string SemVer => GitVersion?.SemVer ?? "1.0.0";
@@ -69,7 +69,7 @@ protected override void OnBuildInitialized()
6969
Target CleanOutput => _ => _
7070
.Executes(() =>
7171
{
72-
EnsureCleanDirectory(ArtifactsDirectory);
72+
ArtifactsDirectory.CreateOrCleanDirectory();
7373
});
7474

7575
Target Restore => _ => _
@@ -121,15 +121,15 @@ protected override void OnBuildInitialized()
121121
.SetFileVersion(AssemblySemFileVer)
122122
.SetInformationalVersion(InformationalVersion));
123123

124-
Compress(BuildBinDirectory / "Fluent.Ribbon" / Configuration, ArtifactsDirectory / $"Fluent.Ribbon-v{NuGetVersion}.zip");
125-
Compress(BuildBinDirectory / "Fluent.Ribbon.Showcase" / Configuration, ArtifactsDirectory / $"Fluent.Ribbon.Showcase-v{NuGetVersion}.zip");
124+
(BuildBinDirectory / "Fluent.Ribbon" / Configuration).CompressTo(ArtifactsDirectory / $"Fluent.Ribbon-v{NuGetVersion}.zip");
125+
(BuildBinDirectory / "Fluent.Ribbon.Showcase" / Configuration).CompressTo(ArtifactsDirectory / $"Fluent.Ribbon.Showcase-v{NuGetVersion}.zip");
126126
});
127127

128128
Target Test => _ => _
129129
.After(Compile)
130130
.Executes(() =>
131131
{
132-
EnsureCleanDirectory(TestResultsDir);
132+
TestResultsDir.CreateOrCleanDirectory();
133133

134134
DotNetTest(_ => _
135135
.SetConfiguration(Configuration)

.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.2008.4",
6+
"version": "3.2206.4",
77
"commands": [
88
"xstyler"
99
]

.nuke/build.schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"title": "Build Schema",
43
"$ref": "#/definitions/build",
4+
"title": "Build Schema",
55
"definitions": {
66
"build": {
77
"type": "object",
@@ -122,4 +122,4 @@
122122
}
123123
}
124124
}
125-
}
125+
}

Build.ps1

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $TempDirectory = "$PSScriptRoot\\.nuke\temp"
1818

1919
$DotNetGlobalFile = "$PSScriptRoot\\global.json"
2020
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
21-
$DotNetChannel = "Current"
21+
$DotNetChannel = "STS"
2222

2323
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
2424
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
@@ -56,14 +56,19 @@ else {
5656
# Install by channel or version
5757
$DotNetDirectory = "$TempDirectory\dotnet-win"
5858
if (!(Test-Path variable:DotNetVersion)) {
59-
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
59+
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
6060
} else {
61-
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
61+
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
6262
}
6363
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
6464
}
6565

66-
Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)"
66+
Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)"
67+
68+
if (Test-Path env:NUKE_ENTERPRISE_TOKEN) {
69+
& $env:DOTNET_EXE nuget remove source "nuke-enterprise" > $null
70+
& $env:DOTNET_EXE nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password $env:NUKE_ENTERPRISE_TOKEN > $null
71+
}
6772

6873
ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
6974
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }

Changelog.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog for Fluent.Ribbon
22

3+
## 10.0.1
4+
5+
- ### Bug fixes
6+
7+
- [#1133](../../issues/1133) - Fixing binding path to attached property for simplified ControlTemplates (thanks @dcm99)
8+
- [#1134](../../issues/1134) - Selected Tab on first render has a black border
9+
- [#1135](../../issues/1135) - Black line between Ribbon and Window (when using a colorful theme)
10+
- [#1125](../../issues/1125) - BackStage Back Button doesn't have an accessibility text.
11+
- [#1151](../../issues/1151) - ComboBox Popup MinWidth too large
12+
- [#1152](../../issues/1152) - Using ObjectToImageConverter via StaticResource raises an exception (thanks @nishy2000)
13+
314
## 10.0.0
415

516
- ### Breaking changes
@@ -21,6 +32,7 @@
2132
Minimize button was moved to the right hand side of the toolbar in the tab item row
2233
- All resources now have the prefix `Fluent.Ribbon.`.
2334
This means that nearly all resources got renamed.
35+
- `InputWidth` was converted from an instance proptery to an attached property in `InputControlProperties`
2436

2537
- ### Bug fixes
2638

Directory.build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
<DisableWinExeOutputInference>true</DisableWinExeOutputInference>
1111
<!-- <RestoreSources>https://ci.appveyor.com/nuget/xamltools;$(RestoreSources)</RestoreSources> -->
1212
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
13+
<CheckEolTargetFramework>false</CheckEolTargetFramework>
14+
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
1315
</PropertyGroup>
1416

1517
<PropertyGroup>

Directory.packages.props

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
<ItemGroup Label="Showcase">
77
<PackageVersion Include="MahApps.Metro.IconPacks.Material" version="4.11.0" />
8-
<PackageVersion Include="MahApps.Metro" version="3.0.0-alpha0454" />
8+
<PackageVersion Include="MahApps.Metro" version="3.0.0-alpha0457" />
99
</ItemGroup>
1010

1111
<ItemGroup Label="Test">
1212
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
13-
<PackageVersion Include="NUnit3TestAdapter" Version="4.4.2" />
13+
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
1414

1515
<PackageVersion Include="NUnit" version="3.13.3" />
1616

@@ -20,11 +20,11 @@
2020
<ItemGroup Label="Build">
2121
<PackageVersion Include="JetBrains.Annotations" version="2022.3.1" />
2222

23-
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.63-beta" />
23+
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.229-beta" />
2424
<PackageVersion Include="XAMLTools.MSBuild" version="1.0.0-alpha0143" />
2525

26-
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" version="4.5.0" />
27-
<PackageVersion Include="StyleCop.Analyzers" version="1.2.0-beta.435" />
26+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" version="4.6.0" />
27+
<PackageVersion Include="StyleCop.Analyzers" version="1.2.0-beta.507" />
2828
<PackageVersion Include="WpfAnalyzers" version="4.1.1" />
2929
</ItemGroup>
3030
</Project>

Fluent.Ribbon.Showcase/TestContent.xaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3588,6 +3588,9 @@
35883588
</GroupBox>
35893589
<GroupBox Header="Issue repros">
35903590
<WrapPanel>
3591+
<WrapPanel.Resources>
3592+
<Fluent:ObjectToImageConverter x:Key="StringToImageConvert"/>
3593+
</WrapPanel.Resources>
35913594
<Fluent:Button x:Name="SleepButton"
35923595
VerticalAlignment="Top"
35933596
Click="SleepButton_OnClick"
@@ -3602,6 +3605,13 @@
36023605
Change theme from thread
36033606
</Fluent:Button>
36043607

3608+
<Fluent:Button VerticalAlignment="Top"
3609+
Tag="/Images/Blue.png"
3610+
Icon="{Binding Path=Tag,RelativeSource={RelativeSource Self},Converter={StaticResource StringToImageConvert}}"
3611+
Size="Middle">
3612+
ObjectToImageConverter for issue #1152
3613+
</Fluent:Button>
3614+
36053615
<GroupBox Header="KeyTip issues #254">
36063616
<StackPanel Orientation="Vertical">
36073617
<formsInterop:WindowsFormsHost>

Fluent.Ribbon.Tests/Converters/ObjectToImageConverterTests.cs

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,35 @@ public void TestDynamicResource()
4141
Assert.That(drawingGroup.Children.Cast<GeometryDrawing>().Select(x => x.Geometry.ToString()),
4242
Is.EquivalentTo(((DrawingGroup)((DrawingImage)Application.Current.FindResource(fluentRibbonImagesApplicationmenuResourceKey)).Drawing).Children.Cast<GeometryDrawing>().Select(x => x.Geometry.ToString())));
4343
}
44-
}
44+
45+
private class DummyProvider : IServiceProvider
46+
{
47+
object IServiceProvider.GetService(Type serviceType)
48+
{
49+
return null;
50+
}
51+
}
52+
53+
[Test]
54+
public void TestStaticResourceSequnece()
55+
{
56+
var fluentRibbonImagesApplicationmenuResourceKey = (object)"Fluent.Ribbon.Images.ApplicationMenu";
57+
58+
var expressionType = typeof(ResourceReferenceExpressionConverter).Assembly.GetType("System.Windows.ResourceReferenceExpression");
59+
60+
var expression = Activator.CreateInstance(expressionType, fluentRibbonImagesApplicationmenuResourceKey);
61+
62+
var converter = new ObjectToImageConverter();
63+
64+
converter.ProvideValue(new DummyProvider());
65+
66+
var convertedValue = StaticConverters.ObjectToImageConverter.Convert(new object[]
67+
{
68+
expression, // value to convert
69+
new ApplicationMenu() // target visual
70+
}, null, null, null);
71+
72+
Assert.That(convertedValue, Is.Not.Null);
73+
Assert.That(convertedValue, Is.InstanceOf<Image>());
74+
}
75+
}

0 commit comments

Comments
 (0)