From e1fa1568af52619ce0f998c681c2c5474e320621 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sat, 10 Apr 2021 17:08:40 +0800
Subject: [PATCH 01/26] Update build.yml
---
.github/workflows/build.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index eebde414..d50b4676 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -8,7 +8,10 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@master
-
+
+ - name: setup nuget.exe
+ uses: NuGet/setup-nuget@master
+
- name: build
shell: pwsh
run: |
From 8b81d1a4aae009d3b9443790580348c64f8bbe0c Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sat, 10 Apr 2021 17:09:06 +0800
Subject: [PATCH 02/26] Update build.yml
---
.github/workflows/build.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d50b4676..cd340f93 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -17,8 +17,8 @@ jobs:
run: |
cd build
.\build.ps1
- tools\nuget pack build build-for-myget.nuspec
+ nuget pack build build-for-myget.nuspec
$nupkgName = @(gci *.nupkg)[0].Name
$mygetSourcePath = "https://www.myget.org/F/handycontrol"
- tools\nuget setApiKey ${{ secrets.MYGETTOKEN }} -Source $mygetSourcePath
- tools\nuget push $nupkgName -Source $mygetSourcePath
+ nuget setApiKey ${{ secrets.MYGETTOKEN }} -Source $mygetSourcePath
+ nuget push $nupkgName -Source $mygetSourcePath
From 11b6f859afcbc8044fb139845779d4ea337866da Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sat, 10 Apr 2021 17:11:13 +0800
Subject: [PATCH 03/26] Update build.yml
---
.github/workflows/build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index cd340f93..fcdcc4cb 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -10,7 +10,7 @@ jobs:
uses: actions/checkout@master
- name: setup nuget.exe
- uses: NuGet/setup-nuget@master
+ uses: NuGet/setup-nuget@v1.0.5
- name: build
shell: pwsh
From b3db675dfe3167896502b9ea8b5364532f9b6760 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sat, 10 Apr 2021 17:17:17 +0800
Subject: [PATCH 04/26] Update build.yml
---
.github/workflows/build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index fcdcc4cb..7cbc1bb6 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -17,7 +17,7 @@ jobs:
run: |
cd build
.\build.ps1
- nuget pack build build-for-myget.nuspec
+ nuget pack build-for-myget.nuspec
$nupkgName = @(gci *.nupkg)[0].Name
$mygetSourcePath = "https://www.myget.org/F/handycontrol"
nuget setApiKey ${{ secrets.MYGETTOKEN }} -Source $mygetSourcePath
From bda0562150e32d358748426b509c2af9df5a6d46 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sat, 10 Apr 2021 17:36:31 +0800
Subject: [PATCH 05/26] Update build.yml
---
.github/workflows/build.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 7cbc1bb6..5fd2bde4 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -11,6 +11,9 @@ jobs:
- name: setup nuget.exe
uses: NuGet/setup-nuget@v1.0.5
+ with:
+ nuget-api-key: ${{ secrets.MYGETTOKEN }}
+ nuget-version: '5.x'
- name: build
shell: pwsh
@@ -20,5 +23,4 @@ jobs:
nuget pack build-for-myget.nuspec
$nupkgName = @(gci *.nupkg)[0].Name
$mygetSourcePath = "https://www.myget.org/F/handycontrol"
- nuget setApiKey ${{ secrets.MYGETTOKEN }} -Source $mygetSourcePath
nuget push $nupkgName -Source $mygetSourcePath
From a254c160ee9620bbe86cc0a938ba86dd4af5ad64 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sat, 10 Apr 2021 17:37:09 +0800
Subject: [PATCH 06/26] Update build-for-myget.nuspec
---
build/build-for-myget.nuspec | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/build/build-for-myget.nuspec b/build/build-for-myget.nuspec
index eb486ee9..e0f05369 100644
--- a/build/build-for-myget.nuspec
+++ b/build/build-for-myget.nuspec
@@ -2,7 +2,7 @@
HandyControl
- 3.1.0.105401
+ 3.1.0.105402
HandyOrg
HandyOrg
HandyOrg
@@ -203,8 +203,5 @@
-
-
-
\ No newline at end of file
From b548bb96c51b06f6089c9834d88375f215b7b4be Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sat, 10 Apr 2021 17:50:22 +0800
Subject: [PATCH 07/26] Update build-for-myget.nuspec
---
build/build-for-myget.nuspec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/build-for-myget.nuspec b/build/build-for-myget.nuspec
index e0f05369..da736bee 100644
--- a/build/build-for-myget.nuspec
+++ b/build/build-for-myget.nuspec
@@ -7,7 +7,7 @@
HandyOrg
HandyOrg
true
- LICENSE
+ https://raw.githubusercontent.com/HandyOrg/HandyControl/master/LICENSE
icon.png
https://github.com/NaBian/HandyControl
Contains some simple and commonly used WPF controls
From 42c9b2c0a8e7772552efef0d30e4576d85b3fb1b Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sat, 10 Apr 2021 17:58:23 +0800
Subject: [PATCH 08/26] Update build-for-myget.nuspec
---
build/build-for-myget.nuspec | 1 -
1 file changed, 1 deletion(-)
diff --git a/build/build-for-myget.nuspec b/build/build-for-myget.nuspec
index da736bee..ba896ab4 100644
--- a/build/build-for-myget.nuspec
+++ b/build/build-for-myget.nuspec
@@ -8,7 +8,6 @@
HandyOrg
true
https://raw.githubusercontent.com/HandyOrg/HandyControl/master/LICENSE
- icon.png
https://github.com/NaBian/HandyControl
Contains some simple and commonly used WPF controls
Copyright © HandyOrg 2018-2021
From bbb01cc58cff81f4c05809d5be2b60269b39a579 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sat, 10 Apr 2021 18:04:18 +0800
Subject: [PATCH 09/26] Update build.yml
---
.github/workflows/build.yml | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 5fd2bde4..9d856c64 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,6 +1,6 @@
name: build
-on: [push, pull_request]
+on: [push]
jobs:
build:
@@ -11,9 +11,6 @@ jobs:
- name: setup nuget.exe
uses: NuGet/setup-nuget@v1.0.5
- with:
- nuget-api-key: ${{ secrets.MYGETTOKEN }}
- nuget-version: '5.x'
- name: build
shell: pwsh
@@ -23,4 +20,5 @@ jobs:
nuget pack build-for-myget.nuspec
$nupkgName = @(gci *.nupkg)[0].Name
$mygetSourcePath = "https://www.myget.org/F/handycontrol"
+ nuget setApiKey ${{ secrets.MYGETTOKEN }} -Source $mygetSourcePath
nuget push $nupkgName -Source $mygetSourcePath
From b2116f5f2165d838644297b51560e4b9b01fd2bd Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sat, 10 Apr 2021 18:22:33 +0800
Subject: [PATCH 10/26] Update build.yml
---
.github/workflows/build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 9d856c64..5fa99cd3 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,6 +1,6 @@
name: build
-on: [push]
+on: workflow_dispatch
jobs:
build:
From 98b9808f975fd3f97a2cbca45b038a282ecf854e Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sat, 10 Apr 2021 18:23:51 +0800
Subject: [PATCH 11/26] Update and rename build.yml to push-to-myget.yml
---
.github/workflows/{build.yml => push-to-myget.yml} | 2 --
1 file changed, 2 deletions(-)
rename .github/workflows/{build.yml => push-to-myget.yml} (97%)
diff --git a/.github/workflows/build.yml b/.github/workflows/push-to-myget.yml
similarity index 97%
rename from .github/workflows/build.yml
rename to .github/workflows/push-to-myget.yml
index 5fa99cd3..cf98ea60 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/push-to-myget.yml
@@ -1,5 +1,3 @@
-name: build
-
on: workflow_dispatch
jobs:
From 1b81fd5188139a05c2b8fe4d9703dcc5c2570b3d Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sat, 10 Apr 2021 18:26:32 +0800
Subject: [PATCH 12/26] Create build.yml
---
.github/workflows/build.yml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 .github/workflows/build.yml
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 00000000..d9212433
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,14 @@
+on: [push, pull_request]
+
+jobs:
+ build:
+ runs-on: windows-latest
+ steps:
+ - name: checkout
+ uses: actions/checkout@master
+
+ - name: build
+ shell: pwsh
+ run: |
+ cd build
+ .\build.ps1
From c680d01da95150f53dfdf4e291cf2c0a7faafd09 Mon Sep 17 00:00:00 2001
From: Mahdi Hosseini
Date: Sat, 10 Apr 2021 15:10:30 +0430
Subject: [PATCH 13/26] Auto Increment version for MYGet build
---
.github/workflows/push-to-myget.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/push-to-myget.yml b/.github/workflows/push-to-myget.yml
index cf98ea60..58ea9d3a 100644
--- a/.github/workflows/push-to-myget.yml
+++ b/.github/workflows/push-to-myget.yml
@@ -15,7 +15,7 @@ jobs:
run: |
cd build
.\build.ps1
- nuget pack build-for-myget.nuspec
+ nuget pack build-for-myget.nuspec -version 3.1.0-beta${env:GITHUB_RUN_NUMBER}
$nupkgName = @(gci *.nupkg)[0].Name
$mygetSourcePath = "https://www.myget.org/F/handycontrol"
nuget setApiKey ${{ secrets.MYGETTOKEN }} -Source $mygetSourcePath
From 8c83ba9b82e7215a9c428d646a23872f836988ec Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sat, 10 Apr 2021 18:42:28 +0800
Subject: [PATCH 14/26] update readme
---
README-cn.md | 5 ++++-
README.md | 3 +++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/README-cn.md b/README-cn.md
index f56a930a..ccf327ad 100644
--- a/README-cn.md
+++ b/README-cn.md
@@ -14,7 +14,10 @@
-
+
+
+
+
diff --git a/README.md b/README.md
index 4a73c6ce..51f11885 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,9 @@
+
+
+
From 5d5d8ca021b71b81b0c27f59ae05505953740b71 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sat, 10 Apr 2021 18:52:10 +0800
Subject: [PATCH 15/26] update Directory.Build.Props
---
build/build-for-myget.nuspec | 2 +-
build/build.nuspec | 2 +-
src/Directory.Build.Props | 12 +++++++-----
.../HandyControlDemo_Net_40.csproj | 1 -
.../HandyControl_Net_40/HandyControl_Net_40.csproj | 13 +++++--------
.../HandyControlDemo_Net_GE45.csproj | 6 ------
.../HandyControl_Net_GE45.csproj | 13 +++++--------
.../HandyControlDemo_Code.csproj | 5 -----
8 files changed, 19 insertions(+), 35 deletions(-)
diff --git a/build/build-for-myget.nuspec b/build/build-for-myget.nuspec
index ba896ab4..6f0627e0 100644
--- a/build/build-for-myget.nuspec
+++ b/build/build-for-myget.nuspec
@@ -2,7 +2,7 @@
HandyControl
- 3.1.0.105402
+ 3.1.0
HandyOrg
HandyOrg
HandyOrg
diff --git a/build/build.nuspec b/build/build.nuspec
index a2ca3d6d..6c255e8d 100644
--- a/build/build.nuspec
+++ b/build/build.nuspec
@@ -10,7 +10,7 @@
LICENSE
icon.png
https://github.com/NaBian/HandyControl
- Contains some commonly used simple WPF controls
+ Contains some simple and commonly used WPF controls
Changes are detailed at https://github.com/HandyOrg/HandyControl/releases
Copyright © HandyOrg 2018-2021
WPF C# Control
diff --git a/src/Directory.Build.Props b/src/Directory.Build.Props
index 18714da4..cb27ef60 100644
--- a/src/Directory.Build.Props
+++ b/src/Directory.Build.Props
@@ -1,11 +1,13 @@
true
- 3.0.0.0
- 3.0.0.0
- 3.0.0.0
- 8.0
- Copyright © HandyOrg 2018-2020
+ 3.1.0.0
+ 3.1.0.0
+ 3.1.0.0
+ latest
+ Copyright © HandyOrg 2018-2021
HandyOrg
+ https://github.com/HandyOrg/HandyControl
+ https://handyorg.github.io/
\ No newline at end of file
diff --git a/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj b/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj
index dc9e03d7..bcbd56df 100644
--- a/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj
+++ b/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj
@@ -6,7 +6,6 @@
net40
..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico
0108;MSB3026;MSB3061
- true
diff --git a/src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj b/src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj
index 5d2db9ee..7b163473 100644
--- a/src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj
+++ b/src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj
@@ -3,18 +3,15 @@
HandyControl
HandyControl
net40
- Contains some commonly used simple WPF controls
+ Contains some simple and commonly used WPF controls
HandyControl
- true
snupkg
0067;0649;1591;0108;1717
- true
..\..\Shared\HandyControl_Shared\key.snk
- Copyright © HandyOrg 2018-2021
- 3.1.0.0
- 3.1.0.0
- 3.1.0.0
- https://github.com/HandyOrg/HandyControl
+ true
+ WPF C# Control
+ Changes are detailed at https://github.com/HandyOrg/HandyControl/releases
+ git
true
diff --git a/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj b/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj
index e4c5a8ed..6166da8a 100644
--- a/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj
+++ b/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj
@@ -7,12 +7,6 @@
..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico
0108;MSB3026;MSB3061
NETSDK1138
- true
- Copyright © HandyOrg 2018-2021
- 3.1.0.0
- 3.1.0.0
- 3.1.0.0
- https://github.com/HandyOrg/HandyControl
..\..\Shared\HandyControlDemo_Shared\app.manifest
diff --git a/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj b/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj
index 195f24e6..9926b810 100644
--- a/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj
+++ b/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj
@@ -3,19 +3,16 @@
HandyControl
HandyControl
netcoreapp3.0;netcoreapp3.1;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net5.0-windows
- Contains some commonly used simple WPF controls
+ Contains some simple and commonly used WPF controls
HandyControl
- true
snupkg
0067;0649;1591;MSB3061;SYSLIB0003;SYSLIB0004
NETSDK1138
- true
..\..\Shared\HandyControl_Shared\key.snk
- Copyright © HandyOrg 2018-2021
- 3.1.0.0
- 3.1.0.0
- 3.1.0.0
- https://github.com/HandyOrg/HandyControl
+ true
+ WPF C# Control
+ Changes are detailed at https://github.com/HandyOrg/HandyControl/releases
+ git
true
diff --git a/src/Shared/HandyControlDemo_Code/HandyControlDemo_Code.csproj b/src/Shared/HandyControlDemo_Code/HandyControlDemo_Code.csproj
index 92a65e77..c116cdcd 100644
--- a/src/Shared/HandyControlDemo_Code/HandyControlDemo_Code.csproj
+++ b/src/Shared/HandyControlDemo_Code/HandyControlDemo_Code.csproj
@@ -6,11 +6,6 @@
netcoreapp3.0;netcoreapp3.1;net40;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net5.0-windows
MSB3026;MSB3061
NETSDK1138
- 3.1.0.0
- Copyright © HandyOrg 2018-2021
- https://github.com/HandyOrg/HandyControl
- 3.1.0.0
- 3.1.0.0
From 2c51fba36c9d9594d10159b451c7c5873215b192 Mon Sep 17 00:00:00 2001
From: Mahdi Hosseini
Date: Sat, 10 Apr 2021 15:23:01 +0430
Subject: [PATCH 16/26] Update push-to-myget.yml
---
.github/workflows/push-to-myget.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/push-to-myget.yml b/.github/workflows/push-to-myget.yml
index 58ea9d3a..13e263ed 100644
--- a/.github/workflows/push-to-myget.yml
+++ b/.github/workflows/push-to-myget.yml
@@ -15,7 +15,7 @@ jobs:
run: |
cd build
.\build.ps1
- nuget pack build-for-myget.nuspec -version 3.1.0-beta${env:GITHUB_RUN_NUMBER}
+ nuget pack build-for-myget.nuspec -version 3.1.0-beta.${env:GITHUB_RUN_NUMBER}
$nupkgName = @(gci *.nupkg)[0].Name
$mygetSourcePath = "https://www.myget.org/F/handycontrol"
nuget setApiKey ${{ secrets.MYGETTOKEN }} -Source $mygetSourcePath
From f7ede3385b6692b0fd6aacfab09517b8fc7817d0 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Tue, 13 Apr 2021 20:54:55 +0800
Subject: [PATCH 17/26] bump up version to 3.2.0
---
.github/workflows/push-to-myget.yml | 4 ++--
src/Directory.Build.Props | 6 +++---
.../HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj | 5 -----
3 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/push-to-myget.yml b/.github/workflows/push-to-myget.yml
index 13e263ed..daa13ce6 100644
--- a/.github/workflows/push-to-myget.yml
+++ b/.github/workflows/push-to-myget.yml
@@ -1,7 +1,7 @@
on: workflow_dispatch
jobs:
- build:
+ push-to-myget:
runs-on: windows-latest
steps:
- name: checkout
@@ -10,7 +10,7 @@ jobs:
- name: setup nuget.exe
uses: NuGet/setup-nuget@v1.0.5
- - name: build
+ - name: build and push
shell: pwsh
run: |
cd build
diff --git a/src/Directory.Build.Props b/src/Directory.Build.Props
index cb27ef60..cb6332cc 100644
--- a/src/Directory.Build.Props
+++ b/src/Directory.Build.Props
@@ -1,9 +1,9 @@
true
- 3.1.0.0
- 3.1.0.0
- 3.1.0.0
+ 3.2.0.0
+ 3.2.0.0
+ 3.2.0.0
latest
Copyright © HandyOrg 2018-2021
HandyOrg
diff --git a/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj b/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj
index bcbd56df..ca67dc56 100644
--- a/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj
+++ b/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj
@@ -584,11 +584,6 @@
move tr Langs
move ca-Es Langs
- Copyright © HandyOrg 2018-2021
- 3.1.0.0
- 3.1.0.0
- 3.1.0.0
- https://github.com/HandyOrg/HandyControl
..\..\Shared\HandyControlDemo_Shared\app.manifest
From f4d4bdde1036ab3e160e805a40dea127d72616a5 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Wed, 14 Apr 2021 23:28:42 +0800
Subject: [PATCH 18/26] fixed #784 and optimized MeasureChild method
---
.../Controls/Panel/RelativePanel.cs | 78 ++++++++++---------
1 file changed, 40 insertions(+), 38 deletions(-)
diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/RelativePanel.cs b/src/Shared/HandyControl_Shared/Controls/Panel/RelativePanel.cs
index 6b84450a..83c4897f 100644
--- a/src/Shared/HandyControl_Shared/Controls/Panel/RelativePanel.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Panel/RelativePanel.cs
@@ -27,7 +27,7 @@ namespace HandyControl.Controls
=> element.SetValue(AlignLeftWithPanelProperty, ValueBoxes.BooleanBox(value));
public static bool GetAlignLeftWithPanel(DependencyObject element)
- => (bool) element.GetValue(AlignLeftWithPanelProperty);
+ => (bool)element.GetValue(AlignLeftWithPanelProperty);
public static readonly DependencyProperty AlignTopWithPanelProperty = DependencyProperty.RegisterAttached(
"AlignTopWithPanel", typeof(bool), typeof(RelativePanel), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsRender));
@@ -36,7 +36,7 @@ namespace HandyControl.Controls
=> element.SetValue(AlignTopWithPanelProperty, ValueBoxes.BooleanBox(value));
public static bool GetAlignTopWithPanel(DependencyObject element)
- => (bool) element.GetValue(AlignTopWithPanelProperty);
+ => (bool)element.GetValue(AlignTopWithPanelProperty);
public static readonly DependencyProperty AlignRightWithPanelProperty = DependencyProperty.RegisterAttached(
"AlignRightWithPanel", typeof(bool), typeof(RelativePanel), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsRender));
@@ -45,7 +45,7 @@ namespace HandyControl.Controls
=> element.SetValue(AlignRightWithPanelProperty, ValueBoxes.BooleanBox(value));
public static bool GetAlignRightWithPanel(DependencyObject element)
- => (bool) element.GetValue(AlignRightWithPanelProperty);
+ => (bool)element.GetValue(AlignRightWithPanelProperty);
public static readonly DependencyProperty AlignBottomWithPanelProperty = DependencyProperty.RegisterAttached(
"AlignBottomWithPanel", typeof(bool), typeof(RelativePanel), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsRender));
@@ -54,7 +54,7 @@ namespace HandyControl.Controls
=> element.SetValue(AlignBottomWithPanelProperty, ValueBoxes.BooleanBox(value));
public static bool GetAlignBottomWithPanel(DependencyObject element)
- => (bool) element.GetValue(AlignBottomWithPanelProperty);
+ => (bool)element.GetValue(AlignBottomWithPanelProperty);
#endregion
@@ -68,7 +68,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignLeftWith(DependencyObject element)
- => (UIElement) element.GetValue(AlignLeftWithProperty);
+ => (UIElement)element.GetValue(AlignLeftWithProperty);
public static readonly DependencyProperty AlignTopWithProperty = DependencyProperty.RegisterAttached(
"AlignTopWith", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -78,7 +78,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignTopWith(DependencyObject element)
- => (UIElement) element.GetValue(AlignTopWithProperty);
+ => (UIElement)element.GetValue(AlignTopWithProperty);
public static readonly DependencyProperty AlignRightWithProperty = DependencyProperty.RegisterAttached(
"AlignRightWith", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -88,7 +88,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignRightWith(DependencyObject element)
- => (UIElement) element.GetValue(AlignRightWithProperty);
+ => (UIElement)element.GetValue(AlignRightWithProperty);
public static readonly DependencyProperty AlignBottomWithProperty = DependencyProperty.RegisterAttached(
"AlignBottomWith", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -98,7 +98,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignBottomWith(DependencyObject element)
- => (UIElement) element.GetValue(AlignBottomWithProperty);
+ => (UIElement)element.GetValue(AlignBottomWithProperty);
#endregion
@@ -112,7 +112,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetLeftOf(DependencyObject element)
- => (UIElement) element.GetValue(LeftOfProperty);
+ => (UIElement)element.GetValue(LeftOfProperty);
public static readonly DependencyProperty AboveProperty = DependencyProperty.RegisterAttached(
"Above", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -122,7 +122,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAbove(DependencyObject element)
- => (UIElement) element.GetValue(AboveProperty);
+ => (UIElement)element.GetValue(AboveProperty);
public static readonly DependencyProperty RightOfProperty = DependencyProperty.RegisterAttached(
"RightOf", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -132,7 +132,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetRightOf(DependencyObject element)
- => (UIElement) element.GetValue(RightOfProperty);
+ => (UIElement)element.GetValue(RightOfProperty);
public static readonly DependencyProperty BelowProperty = DependencyProperty.RegisterAttached(
"Below", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -142,7 +142,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetBelow(DependencyObject element)
- => (UIElement) element.GetValue(BelowProperty);
+ => (UIElement)element.GetValue(BelowProperty);
#endregion
@@ -155,7 +155,7 @@ namespace HandyControl.Controls
=> element.SetValue(AlignHorizontalCenterWithPanelProperty, ValueBoxes.BooleanBox(value));
public static bool GetAlignHorizontalCenterWithPanel(DependencyObject element)
- => (bool) element.GetValue(AlignHorizontalCenterWithPanelProperty);
+ => (bool)element.GetValue(AlignHorizontalCenterWithPanelProperty);
public static readonly DependencyProperty AlignVerticalCenterWithPanelProperty = DependencyProperty.RegisterAttached(
"AlignVerticalCenterWithPanel", typeof(bool), typeof(RelativePanel), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsRender));
@@ -164,7 +164,7 @@ namespace HandyControl.Controls
=> element.SetValue(AlignVerticalCenterWithPanelProperty, ValueBoxes.BooleanBox(value));
public static bool GetAlignVerticalCenterWithPanel(DependencyObject element)
- => (bool) element.GetValue(AlignVerticalCenterWithPanelProperty);
+ => (bool)element.GetValue(AlignVerticalCenterWithPanelProperty);
public static readonly DependencyProperty AlignHorizontalCenterWithProperty = DependencyProperty.RegisterAttached(
"AlignHorizontalCenterWith", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -174,7 +174,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignHorizontalCenterWith(DependencyObject element)
- => (UIElement) element.GetValue(AlignHorizontalCenterWithProperty);
+ => (UIElement)element.GetValue(AlignHorizontalCenterWithProperty);
public static readonly DependencyProperty AlignVerticalCenterWithProperty = DependencyProperty.RegisterAttached(
"AlignVerticalCenterWith", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -184,7 +184,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignVerticalCenterWith(DependencyObject element)
- => (UIElement) element.GetValue(AlignVerticalCenterWithProperty);
+ => (UIElement)element.GetValue(AlignVerticalCenterWithProperty);
#endregion
@@ -218,7 +218,7 @@ namespace HandyControl.Controls
#region Calc AvailableSize
_childGraph.Reset(false);
- var boundingSize = _childGraph.GetBoundingSize(Width.IsNaN(), Height.IsNaN());
+ var boundingSize = _childGraph.GetBoundingSize(Width.IsNaN(), Height.IsNaN(), availableSize);
_childGraph.Reset();
_childGraph.Measure(boundingSize);
return boundingSize;
@@ -454,6 +454,8 @@ namespace HandyControl.Controls
private void MeasureChild(GraphNode node)
{
+ var availableSize = AvailableSize;
+
var child = node.Element;
child.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
node.OriginDesiredSize = child.DesiredSize;
@@ -502,10 +504,10 @@ namespace HandyControl.Controls
#region Measure
- var availableHeight = AvailableSize.Height - node.Top - node.Bottom;
+ var availableHeight = availableSize.Height - node.Top - node.Bottom;
if (availableHeight.IsNaN())
{
- availableHeight = AvailableSize.Height;
+ availableHeight = availableSize.Height;
if (!node.Top.IsNaN() && node.Bottom.IsNaN())
{
@@ -517,10 +519,10 @@ namespace HandyControl.Controls
}
}
- var availableWidth = AvailableSize.Width - node.Left - node.Right;
+ var availableWidth = availableSize.Width - node.Left - node.Right;
if (availableWidth.IsNaN())
{
- availableWidth = AvailableSize.Width;
+ availableWidth = availableSize.Width;
if (!node.Left.IsNaN() && node.Right.IsNaN())
{
@@ -558,7 +560,7 @@ namespace HandyControl.Controls
if (node.Left.IsNaN())
{
- node.Left = AvailableSize.Width - node.RightOfNode.Right;
+ node.Left = availableSize.Width - node.RightOfNode.Right;
}
}
@@ -571,7 +573,7 @@ namespace HandyControl.Controls
if (node.Top.IsNaN())
{
- node.Top = AvailableSize.Height - node.BelowNode.Bottom;
+ node.Top = availableSize.Height - node.BelowNode.Bottom;
}
}
@@ -581,8 +583,8 @@ namespace HandyControl.Controls
if (node.AlignHorizontalCenterWith != null)
{
- var halfWidthLeft = (AvailableSize.Width + node.AlignHorizontalCenterWith.Left - node.AlignHorizontalCenterWith.Right - childSize.Width) * 0.5;
- var halfWidthRight = (AvailableSize.Width - node.AlignHorizontalCenterWith.Left + node.AlignHorizontalCenterWith.Right - childSize.Width) * 0.5;
+ var halfWidthLeft = (availableSize.Width + node.AlignHorizontalCenterWith.Left - node.AlignHorizontalCenterWith.Right - childSize.Width) * 0.5;
+ var halfWidthRight = (availableSize.Width - node.AlignHorizontalCenterWith.Left + node.AlignHorizontalCenterWith.Right - childSize.Width) * 0.5;
if (node.Left.IsNaN()) node.Left = halfWidthLeft;
else node.Left = (node.Left + halfWidthLeft) * 0.5;
@@ -593,8 +595,8 @@ namespace HandyControl.Controls
if (node.AlignVerticalCenterWith != null)
{
- var halfHeightTop = (AvailableSize.Height + node.AlignVerticalCenterWith.Top - node.AlignVerticalCenterWith.Bottom - childSize.Height) * 0.5;
- var halfHeightBottom = (AvailableSize.Height - node.AlignVerticalCenterWith.Top + node.AlignVerticalCenterWith.Bottom - childSize.Height) * 0.5;
+ var halfHeightTop = (availableSize.Height + node.AlignVerticalCenterWith.Top - node.AlignVerticalCenterWith.Bottom - childSize.Height) * 0.5;
+ var halfHeightBottom = (availableSize.Height - node.AlignVerticalCenterWith.Top + node.AlignVerticalCenterWith.Bottom - childSize.Height) * 0.5;
if (node.Top.IsNaN()) node.Top = halfHeightTop;
else node.Top = (node.Top + halfHeightTop) * 0.5;
@@ -609,7 +611,7 @@ namespace HandyControl.Controls
if (GetAlignHorizontalCenterWithPanel(child))
{
- var halfSubWidth = (AvailableSize.Width - childSize.Width) * 0.5;
+ var halfSubWidth = (availableSize.Width - childSize.Width) * 0.5;
if (node.Left.IsNaN()) node.Left = halfSubWidth;
else node.Left = (node.Left + halfSubWidth) * 0.5;
@@ -620,7 +622,7 @@ namespace HandyControl.Controls
if (GetAlignVerticalCenterWithPanel(child))
{
- var halfSubHeight = (AvailableSize.Height - childSize.Height) * 0.5;
+ var halfSubHeight = (availableSize.Height - childSize.Height) * 0.5;
if (node.Top.IsNaN()) node.Top = halfSubHeight;
else node.Top = (node.Top + halfSubHeight) * 0.5;
@@ -634,37 +636,37 @@ namespace HandyControl.Controls
if (node.Left.IsNaN())
{
if (!node.Right.IsNaN())
- node.Left = AvailableSize.Width - node.Right - childSize.Width;
+ node.Left = availableSize.Width - node.Right - childSize.Width;
else
{
node.Left = 0;
- node.Right = AvailableSize.Width - childSize.Width;
+ node.Right = availableSize.Width - childSize.Width;
}
}
else if (!node.Left.IsNaN() && node.Right.IsNaN())
{
- node.Right = AvailableSize.Width - node.Left - childSize.Width;
+ node.Right = availableSize.Width - node.Left - childSize.Width;
}
if (node.Top.IsNaN())
{
if (!node.Bottom.IsNaN())
- node.Top = AvailableSize.Height - node.Bottom - childSize.Height;
+ node.Top = availableSize.Height - node.Bottom - childSize.Height;
else
{
node.Top = 0;
- node.Bottom = AvailableSize.Height - childSize.Height;
+ node.Bottom = availableSize.Height - childSize.Height;
}
}
else if (!node.Top.IsNaN() && node.Bottom.IsNaN())
{
- node.Bottom = AvailableSize.Height - node.Top - childSize.Height;
+ node.Bottom = availableSize.Height - node.Top - childSize.Height;
}
node.Measured = true;
}
- public Size GetBoundingSize(bool calcWidth, bool calcHeight)
+ public Size GetBoundingSize(bool calcWidth, bool calcHeight, Size availableSize)
{
var boundingSize = new Size();
@@ -675,8 +677,8 @@ namespace HandyControl.Controls
boundingSize.Height = Math.Max(boundingSize.Height, size.Height);
}
- boundingSize.Width = calcWidth ? boundingSize.Width : AvailableSize.Width;
- boundingSize.Height = calcHeight ? boundingSize.Height : AvailableSize.Height;
+ boundingSize.Width = calcWidth ? Math.Max(availableSize.Width, boundingSize.Width) : availableSize.Width;
+ boundingSize.Height = calcHeight ? Math.Max(availableSize.Height, boundingSize.Height) : availableSize.Height;
return boundingSize;
}
}
From b30b2ce72a46c1c1cdbe61f5b0b80f74f1af382d Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Wed, 14 Apr 2021 23:35:36 +0800
Subject: [PATCH 19/26] Update push-to-myget.yml
---
.github/workflows/push-to-myget.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/push-to-myget.yml b/.github/workflows/push-to-myget.yml
index daa13ce6..1d100f37 100644
--- a/.github/workflows/push-to-myget.yml
+++ b/.github/workflows/push-to-myget.yml
@@ -15,7 +15,7 @@ jobs:
run: |
cd build
.\build.ps1
- nuget pack build-for-myget.nuspec -version 3.1.0-beta.${env:GITHUB_RUN_NUMBER}
+ nuget pack build-for-myget.nuspec -version 3.2.0-beta.${env:GITHUB_RUN_NUMBER}
$nupkgName = @(gci *.nupkg)[0].Name
$mygetSourcePath = "https://www.myget.org/F/handycontrol"
nuget setApiKey ${{ secrets.MYGETTOKEN }} -Source $mygetSourcePath
From b53464d0ef992f24d2c63a38ed5d43714d7e8dca Mon Sep 17 00:00:00 2001
From: "github-actions-dotnet-formatter[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Wed, 14 Apr 2021 15:37:11 +0000
Subject: [PATCH 20/26] Automated dotnet-format update
---
.../Controls/Panel/RelativePanel.cs | 32 +++++++++----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/RelativePanel.cs b/src/Shared/HandyControl_Shared/Controls/Panel/RelativePanel.cs
index 83c4897f..de0ed70f 100644
--- a/src/Shared/HandyControl_Shared/Controls/Panel/RelativePanel.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Panel/RelativePanel.cs
@@ -27,7 +27,7 @@ namespace HandyControl.Controls
=> element.SetValue(AlignLeftWithPanelProperty, ValueBoxes.BooleanBox(value));
public static bool GetAlignLeftWithPanel(DependencyObject element)
- => (bool)element.GetValue(AlignLeftWithPanelProperty);
+ => (bool) element.GetValue(AlignLeftWithPanelProperty);
public static readonly DependencyProperty AlignTopWithPanelProperty = DependencyProperty.RegisterAttached(
"AlignTopWithPanel", typeof(bool), typeof(RelativePanel), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsRender));
@@ -36,7 +36,7 @@ namespace HandyControl.Controls
=> element.SetValue(AlignTopWithPanelProperty, ValueBoxes.BooleanBox(value));
public static bool GetAlignTopWithPanel(DependencyObject element)
- => (bool)element.GetValue(AlignTopWithPanelProperty);
+ => (bool) element.GetValue(AlignTopWithPanelProperty);
public static readonly DependencyProperty AlignRightWithPanelProperty = DependencyProperty.RegisterAttached(
"AlignRightWithPanel", typeof(bool), typeof(RelativePanel), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsRender));
@@ -45,7 +45,7 @@ namespace HandyControl.Controls
=> element.SetValue(AlignRightWithPanelProperty, ValueBoxes.BooleanBox(value));
public static bool GetAlignRightWithPanel(DependencyObject element)
- => (bool)element.GetValue(AlignRightWithPanelProperty);
+ => (bool) element.GetValue(AlignRightWithPanelProperty);
public static readonly DependencyProperty AlignBottomWithPanelProperty = DependencyProperty.RegisterAttached(
"AlignBottomWithPanel", typeof(bool), typeof(RelativePanel), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsRender));
@@ -54,7 +54,7 @@ namespace HandyControl.Controls
=> element.SetValue(AlignBottomWithPanelProperty, ValueBoxes.BooleanBox(value));
public static bool GetAlignBottomWithPanel(DependencyObject element)
- => (bool)element.GetValue(AlignBottomWithPanelProperty);
+ => (bool) element.GetValue(AlignBottomWithPanelProperty);
#endregion
@@ -68,7 +68,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignLeftWith(DependencyObject element)
- => (UIElement)element.GetValue(AlignLeftWithProperty);
+ => (UIElement) element.GetValue(AlignLeftWithProperty);
public static readonly DependencyProperty AlignTopWithProperty = DependencyProperty.RegisterAttached(
"AlignTopWith", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -78,7 +78,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignTopWith(DependencyObject element)
- => (UIElement)element.GetValue(AlignTopWithProperty);
+ => (UIElement) element.GetValue(AlignTopWithProperty);
public static readonly DependencyProperty AlignRightWithProperty = DependencyProperty.RegisterAttached(
"AlignRightWith", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -88,7 +88,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignRightWith(DependencyObject element)
- => (UIElement)element.GetValue(AlignRightWithProperty);
+ => (UIElement) element.GetValue(AlignRightWithProperty);
public static readonly DependencyProperty AlignBottomWithProperty = DependencyProperty.RegisterAttached(
"AlignBottomWith", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -98,7 +98,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignBottomWith(DependencyObject element)
- => (UIElement)element.GetValue(AlignBottomWithProperty);
+ => (UIElement) element.GetValue(AlignBottomWithProperty);
#endregion
@@ -112,7 +112,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetLeftOf(DependencyObject element)
- => (UIElement)element.GetValue(LeftOfProperty);
+ => (UIElement) element.GetValue(LeftOfProperty);
public static readonly DependencyProperty AboveProperty = DependencyProperty.RegisterAttached(
"Above", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -122,7 +122,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAbove(DependencyObject element)
- => (UIElement)element.GetValue(AboveProperty);
+ => (UIElement) element.GetValue(AboveProperty);
public static readonly DependencyProperty RightOfProperty = DependencyProperty.RegisterAttached(
"RightOf", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -132,7 +132,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetRightOf(DependencyObject element)
- => (UIElement)element.GetValue(RightOfProperty);
+ => (UIElement) element.GetValue(RightOfProperty);
public static readonly DependencyProperty BelowProperty = DependencyProperty.RegisterAttached(
"Below", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -142,7 +142,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetBelow(DependencyObject element)
- => (UIElement)element.GetValue(BelowProperty);
+ => (UIElement) element.GetValue(BelowProperty);
#endregion
@@ -155,7 +155,7 @@ namespace HandyControl.Controls
=> element.SetValue(AlignHorizontalCenterWithPanelProperty, ValueBoxes.BooleanBox(value));
public static bool GetAlignHorizontalCenterWithPanel(DependencyObject element)
- => (bool)element.GetValue(AlignHorizontalCenterWithPanelProperty);
+ => (bool) element.GetValue(AlignHorizontalCenterWithPanelProperty);
public static readonly DependencyProperty AlignVerticalCenterWithPanelProperty = DependencyProperty.RegisterAttached(
"AlignVerticalCenterWithPanel", typeof(bool), typeof(RelativePanel), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsRender));
@@ -164,7 +164,7 @@ namespace HandyControl.Controls
=> element.SetValue(AlignVerticalCenterWithPanelProperty, ValueBoxes.BooleanBox(value));
public static bool GetAlignVerticalCenterWithPanel(DependencyObject element)
- => (bool)element.GetValue(AlignVerticalCenterWithPanelProperty);
+ => (bool) element.GetValue(AlignVerticalCenterWithPanelProperty);
public static readonly DependencyProperty AlignHorizontalCenterWithProperty = DependencyProperty.RegisterAttached(
"AlignHorizontalCenterWith", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -174,7 +174,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignHorizontalCenterWith(DependencyObject element)
- => (UIElement)element.GetValue(AlignHorizontalCenterWithProperty);
+ => (UIElement) element.GetValue(AlignHorizontalCenterWithProperty);
public static readonly DependencyProperty AlignVerticalCenterWithProperty = DependencyProperty.RegisterAttached(
"AlignVerticalCenterWith", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
@@ -184,7 +184,7 @@ namespace HandyControl.Controls
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignVerticalCenterWith(DependencyObject element)
- => (UIElement)element.GetValue(AlignVerticalCenterWithProperty);
+ => (UIElement) element.GetValue(AlignVerticalCenterWithProperty);
#endregion
From 916d3d12b2f04ea5115cc0088589741a64b62a0e Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Mon, 19 Apr 2021 21:39:37 +0800
Subject: [PATCH 21/26] fixed #794
---
.../Controls/Panel/RelativePanel.cs | 51 ++++++++++---------
1 file changed, 27 insertions(+), 24 deletions(-)
diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/RelativePanel.cs b/src/Shared/HandyControl_Shared/Controls/Panel/RelativePanel.cs
index 83c4897f..51cd00b4 100644
--- a/src/Shared/HandyControl_Shared/Controls/Panel/RelativePanel.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Panel/RelativePanel.cs
@@ -218,7 +218,12 @@ namespace HandyControl.Controls
#region Calc AvailableSize
_childGraph.Reset(false);
- var boundingSize = _childGraph.GetBoundingSize(Width.IsNaN(), Height.IsNaN(), availableSize);
+
+
+ var calcWidth = Width.IsNaN() && HorizontalAlignment != HorizontalAlignment.Stretch;
+ var calcHeight = Height.IsNaN() && VerticalAlignment != VerticalAlignment.Stretch;
+
+ var boundingSize = _childGraph.GetBoundingSize(calcWidth, calcHeight);
_childGraph.Reset();
_childGraph.Measure(boundingSize);
return boundingSize;
@@ -454,8 +459,6 @@ namespace HandyControl.Controls
private void MeasureChild(GraphNode node)
{
- var availableSize = AvailableSize;
-
var child = node.Element;
child.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
node.OriginDesiredSize = child.DesiredSize;
@@ -504,10 +507,10 @@ namespace HandyControl.Controls
#region Measure
- var availableHeight = availableSize.Height - node.Top - node.Bottom;
+ var availableHeight = AvailableSize.Height - node.Top - node.Bottom;
if (availableHeight.IsNaN())
{
- availableHeight = availableSize.Height;
+ availableHeight = AvailableSize.Height;
if (!node.Top.IsNaN() && node.Bottom.IsNaN())
{
@@ -519,10 +522,10 @@ namespace HandyControl.Controls
}
}
- var availableWidth = availableSize.Width - node.Left - node.Right;
+ var availableWidth = AvailableSize.Width - node.Left - node.Right;
if (availableWidth.IsNaN())
{
- availableWidth = availableSize.Width;
+ availableWidth = AvailableSize.Width;
if (!node.Left.IsNaN() && node.Right.IsNaN())
{
@@ -560,7 +563,7 @@ namespace HandyControl.Controls
if (node.Left.IsNaN())
{
- node.Left = availableSize.Width - node.RightOfNode.Right;
+ node.Left = AvailableSize.Width - node.RightOfNode.Right;
}
}
@@ -573,7 +576,7 @@ namespace HandyControl.Controls
if (node.Top.IsNaN())
{
- node.Top = availableSize.Height - node.BelowNode.Bottom;
+ node.Top = AvailableSize.Height - node.BelowNode.Bottom;
}
}
@@ -583,8 +586,8 @@ namespace HandyControl.Controls
if (node.AlignHorizontalCenterWith != null)
{
- var halfWidthLeft = (availableSize.Width + node.AlignHorizontalCenterWith.Left - node.AlignHorizontalCenterWith.Right - childSize.Width) * 0.5;
- var halfWidthRight = (availableSize.Width - node.AlignHorizontalCenterWith.Left + node.AlignHorizontalCenterWith.Right - childSize.Width) * 0.5;
+ var halfWidthLeft = (AvailableSize.Width + node.AlignHorizontalCenterWith.Left - node.AlignHorizontalCenterWith.Right - childSize.Width) * 0.5;
+ var halfWidthRight = (AvailableSize.Width - node.AlignHorizontalCenterWith.Left + node.AlignHorizontalCenterWith.Right - childSize.Width) * 0.5;
if (node.Left.IsNaN()) node.Left = halfWidthLeft;
else node.Left = (node.Left + halfWidthLeft) * 0.5;
@@ -595,8 +598,8 @@ namespace HandyControl.Controls
if (node.AlignVerticalCenterWith != null)
{
- var halfHeightTop = (availableSize.Height + node.AlignVerticalCenterWith.Top - node.AlignVerticalCenterWith.Bottom - childSize.Height) * 0.5;
- var halfHeightBottom = (availableSize.Height - node.AlignVerticalCenterWith.Top + node.AlignVerticalCenterWith.Bottom - childSize.Height) * 0.5;
+ var halfHeightTop = (AvailableSize.Height + node.AlignVerticalCenterWith.Top - node.AlignVerticalCenterWith.Bottom - childSize.Height) * 0.5;
+ var halfHeightBottom = (AvailableSize.Height - node.AlignVerticalCenterWith.Top + node.AlignVerticalCenterWith.Bottom - childSize.Height) * 0.5;
if (node.Top.IsNaN()) node.Top = halfHeightTop;
else node.Top = (node.Top + halfHeightTop) * 0.5;
@@ -611,7 +614,7 @@ namespace HandyControl.Controls
if (GetAlignHorizontalCenterWithPanel(child))
{
- var halfSubWidth = (availableSize.Width - childSize.Width) * 0.5;
+ var halfSubWidth = (AvailableSize.Width - childSize.Width) * 0.5;
if (node.Left.IsNaN()) node.Left = halfSubWidth;
else node.Left = (node.Left + halfSubWidth) * 0.5;
@@ -622,7 +625,7 @@ namespace HandyControl.Controls
if (GetAlignVerticalCenterWithPanel(child))
{
- var halfSubHeight = (availableSize.Height - childSize.Height) * 0.5;
+ var halfSubHeight = (AvailableSize.Height - childSize.Height) * 0.5;
if (node.Top.IsNaN()) node.Top = halfSubHeight;
else node.Top = (node.Top + halfSubHeight) * 0.5;
@@ -636,37 +639,37 @@ namespace HandyControl.Controls
if (node.Left.IsNaN())
{
if (!node.Right.IsNaN())
- node.Left = availableSize.Width - node.Right - childSize.Width;
+ node.Left = AvailableSize.Width - node.Right - childSize.Width;
else
{
node.Left = 0;
- node.Right = availableSize.Width - childSize.Width;
+ node.Right = AvailableSize.Width - childSize.Width;
}
}
else if (!node.Left.IsNaN() && node.Right.IsNaN())
{
- node.Right = availableSize.Width - node.Left - childSize.Width;
+ node.Right = AvailableSize.Width - node.Left - childSize.Width;
}
if (node.Top.IsNaN())
{
if (!node.Bottom.IsNaN())
- node.Top = availableSize.Height - node.Bottom - childSize.Height;
+ node.Top = AvailableSize.Height - node.Bottom - childSize.Height;
else
{
node.Top = 0;
- node.Bottom = availableSize.Height - childSize.Height;
+ node.Bottom = AvailableSize.Height - childSize.Height;
}
}
else if (!node.Top.IsNaN() && node.Bottom.IsNaN())
{
- node.Bottom = availableSize.Height - node.Top - childSize.Height;
+ node.Bottom = AvailableSize.Height - node.Top - childSize.Height;
}
node.Measured = true;
}
- public Size GetBoundingSize(bool calcWidth, bool calcHeight, Size availableSize)
+ public Size GetBoundingSize(bool calcWidth, bool calcHeight)
{
var boundingSize = new Size();
@@ -677,8 +680,8 @@ namespace HandyControl.Controls
boundingSize.Height = Math.Max(boundingSize.Height, size.Height);
}
- boundingSize.Width = calcWidth ? Math.Max(availableSize.Width, boundingSize.Width) : availableSize.Width;
- boundingSize.Height = calcHeight ? Math.Max(availableSize.Height, boundingSize.Height) : availableSize.Height;
+ boundingSize.Width = calcWidth ? boundingSize.Width : AvailableSize.Width;
+ boundingSize.Height = calcHeight ? boundingSize.Height : AvailableSize.Height;
return boundingSize;
}
}
From 3719b59629c59cb2070f0a2c2756cb56dbadb234 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Tue, 20 Apr 2021 21:14:12 +0800
Subject: [PATCH 22/26] minor modify
---
src/Net_40/HandyControl_Net_40/Themes/Theme.xaml | 8 ++++----
.../Themes/Styles/Base/ExpanderBaseStyle.xaml | 8 ++++----
src/Shared/HandyControl_Shared/Themes/Theme.xaml | 8 ++++----
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml b/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
index 1a9a5274..00a5e949 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
+++ b/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
@@ -8290,7 +8290,7 @@
-
+
@@ -8321,7 +8321,7 @@
-
+
@@ -8357,7 +8357,7 @@
-
+
@@ -8388,7 +8388,7 @@
-
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ExpanderBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ExpanderBaseStyle.xaml
index 560a2d22..77084221 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ExpanderBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ExpanderBaseStyle.xaml
@@ -41,7 +41,7 @@
-
+
@@ -73,7 +73,7 @@
-
+
@@ -110,7 +110,7 @@
-
+
@@ -142,7 +142,7 @@
-
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Theme.xaml b/src/Shared/HandyControl_Shared/Themes/Theme.xaml
index 5ade2185..a202a1c2 100644
--- a/src/Shared/HandyControl_Shared/Themes/Theme.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Theme.xaml
@@ -8408,7 +8408,7 @@
-
+
@@ -8439,7 +8439,7 @@
-
+
@@ -8475,7 +8475,7 @@
-
+
@@ -8506,7 +8506,7 @@
-
+
From 63acdfca0dad69e91a1e4358bc7b245243888fb7 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Wed, 21 Apr 2021 21:56:54 +0800
Subject: [PATCH 23/26] fixed #787
---
src/Net_40/HandyControl_Net_40/Themes/Theme.xaml | 8 ++++----
.../Themes/Styles/Base/ExpanderBaseStyle.xaml | 8 ++++----
src/Shared/HandyControl_Shared/Themes/Theme.xaml | 8 ++++----
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml b/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
index 00a5e949..590a5318 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
+++ b/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
@@ -8261,7 +8261,7 @@
-
+
@@ -8297,7 +8297,7 @@
-
+
@@ -8329,7 +8329,7 @@
-
+
@@ -8365,7 +8365,7 @@
-
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ExpanderBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ExpanderBaseStyle.xaml
index 77084221..3ccbc575 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ExpanderBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ExpanderBaseStyle.xaml
@@ -12,7 +12,7 @@
-
+
@@ -49,7 +49,7 @@
-
+
@@ -82,7 +82,7 @@
-
+
@@ -119,7 +119,7 @@
-
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Theme.xaml b/src/Shared/HandyControl_Shared/Themes/Theme.xaml
index a202a1c2..77c53086 100644
--- a/src/Shared/HandyControl_Shared/Themes/Theme.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Theme.xaml
@@ -8379,7 +8379,7 @@
-
+
@@ -8415,7 +8415,7 @@
-
+
@@ -8447,7 +8447,7 @@
-
+
@@ -8483,7 +8483,7 @@
-
+
From 4d72f1f9210503c9e988eaf6832a0267b8b2c838 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Wed, 21 Apr 2021 22:34:00 +0800
Subject: [PATCH 24/26] Update MessageBox.cs
---
.../Controls/Window/MessageBox.cs | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/Shared/HandyControl_Shared/Controls/Window/MessageBox.cs b/src/Shared/HandyControl_Shared/Controls/Window/MessageBox.cs
index adfd8784..25af6967 100644
--- a/src/Shared/HandyControl_Shared/Controls/Window/MessageBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Window/MessageBox.cs
@@ -50,6 +50,8 @@ namespace HandyControl.Controls
private bool _showNo;
+ private IntPtr _lastActiveWindowIntPtr;
+
public static readonly DependencyProperty MessageProperty = DependencyProperty.Register(
"Message", typeof(string), typeof(MessageBox), new PropertyMetadata(default(string)));
@@ -127,6 +129,16 @@ namespace HandyControl.Controls
}
base.OnSourceInitialized(e);
+
+ _lastActiveWindowIntPtr = InteropMethods.GetForegroundWindow();
+ Activate();
+ }
+
+ protected override void OnClosed(EventArgs e)
+ {
+ InteropMethods.SetForegroundWindow(_lastActiveWindowIntPtr);
+
+ base.OnClosed(e);
}
public override void OnApplyTemplate()
From 0b282aa1650d61fc072797c32e77d18346bae6f0 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Thu, 22 Apr 2021 15:07:04 +0800
Subject: [PATCH 25/26] Update README.md
---
README.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/README.md b/README.md
index 51f11885..ff0508a5 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,10 @@
## 面向中国
+### 招聘
+
+百度地图,招 WPF 研发工程师,坐标上海,有意私聊 836904362@qq.com
+
### 码云
[https://gitee.com/handyorg/HandyControl/](https://gitee.com/handyorg/HandyControl/)
From cc59d29a0bab25affe6765f29ece1eb4e7e761db Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Thu, 22 Apr 2021 15:07:35 +0800
Subject: [PATCH 26/26] Update README-cn.md
---
README-cn.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/README-cn.md b/README-cn.md
index ccf327ad..de6cc098 100644
--- a/README-cn.md
+++ b/README-cn.md
@@ -31,6 +31,10 @@
## 面向中国
+### 招聘
+
+百度地图,招 WPF 研发工程师,坐标上海,有意私聊 836904362@qq.com
+
### 码云
[https://gitee.com/handyorg/HandyControl/](https://gitee.com/handyorg/HandyControl/)