diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eebde414..d9212433 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,3 @@ -name: build - on: [push, pull_request] jobs: @@ -8,14 +6,9 @@ jobs: steps: - name: checkout uses: actions/checkout@master - + - name: build shell: pwsh run: | cd build .\build.ps1 - tools\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 diff --git a/.github/workflows/push-to-myget.yml b/.github/workflows/push-to-myget.yml new file mode 100644 index 00000000..1d100f37 --- /dev/null +++ b/.github/workflows/push-to-myget.yml @@ -0,0 +1,22 @@ +on: workflow_dispatch + +jobs: + push-to-myget: + runs-on: windows-latest + steps: + - name: checkout + uses: actions/checkout@master + + - name: setup nuget.exe + uses: NuGet/setup-nuget@v1.0.5 + + - name: build and push + shell: pwsh + run: | + cd build + .\build.ps1 + 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 + nuget push $nupkgName -Source $mygetSourcePath diff --git a/README-cn.md b/README-cn.md index f56a930a..de6cc098 100644 --- a/README-cn.md +++ b/README-cn.md @@ -14,7 +14,10 @@ IDE-version nuget-version - + + + myget-version + Github-build-status @@ -28,6 +31,10 @@ ## 面向中国 +### 招聘 + +百度地图,招 WPF 研发工程师,坐标上海,有意私聊 836904362@qq.com + ### 码云 [https://gitee.com/handyorg/HandyControl/](https://gitee.com/handyorg/HandyControl/) diff --git a/README.md b/README.md index 4a73c6ce..ff0508a5 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,9 @@ nuget-version + + myget-version + Github-build-status @@ -28,6 +31,10 @@ ## 面向中国 +### 招聘 + +百度地图,招 WPF 研发工程师,坐标上海,有意私聊 836904362@qq.com + ### 码云 [https://gitee.com/handyorg/HandyControl/](https://gitee.com/handyorg/HandyControl/) diff --git a/build/build-for-myget.nuspec b/build/build-for-myget.nuspec index eb486ee9..6f0627e0 100644 --- a/build/build-for-myget.nuspec +++ b/build/build-for-myget.nuspec @@ -2,13 +2,12 @@ HandyControl - 3.1.0.105401 + 3.1.0 HandyOrg HandyOrg HandyOrg true - LICENSE - icon.png + https://raw.githubusercontent.com/HandyOrg/HandyControl/master/LICENSE https://github.com/NaBian/HandyControl Contains some simple and commonly used WPF controls Copyright © HandyOrg 2018-2021 @@ -203,8 +202,5 @@ - - - \ No newline at end of file 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..cb6332cc 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.2.0.0 + 3.2.0.0 + 3.2.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..ca67dc56 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 @@ -585,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 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_40/HandyControl_Net_40/Themes/Theme.xaml b/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml index 1a9a5274..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 @@ - + @@ -8290,14 +8290,14 @@ - + - + @@ -8321,7 +8321,7 @@ - + @@ -8329,7 +8329,7 @@ - + @@ -8357,7 +8357,7 @@ - + @@ -8365,7 +8365,7 @@ - + @@ -8388,7 +8388,7 @@ - + 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 diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/RelativePanel.cs b/src/Shared/HandyControl_Shared/Controls/Panel/RelativePanel.cs index 6b84450a..2574b1b5 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()); + + + 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; 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() diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ExpanderBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ExpanderBaseStyle.xaml index 560a2d22..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 @@ - + @@ -41,7 +41,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -73,7 +73,7 @@ - + @@ -82,7 +82,7 @@ - + @@ -110,7 +110,7 @@ - + @@ -119,7 +119,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..77c53086 100644 --- a/src/Shared/HandyControl_Shared/Themes/Theme.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Theme.xaml @@ -8379,7 +8379,7 @@ - + @@ -8408,14 +8408,14 @@ - + - + @@ -8439,7 +8439,7 @@ - + @@ -8447,7 +8447,7 @@ - + @@ -8475,7 +8475,7 @@ - + @@ -8483,7 +8483,7 @@ - + @@ -8506,7 +8506,7 @@ - +