├── .gitattributes ├── .gitignore ├── DMSkin-for-WPF.sln ├── DMSkin.Core ├── Common │ ├── Base64.cs │ ├── Execute.cs │ ├── HTTP.cs │ └── UINT.cs ├── Converters │ ├── BoolToVisibilityConverter.cs │ ├── CompareToVisibilityConverter.cs │ ├── EnumToBooleanConverter.cs │ ├── EnumToVisibilityConverter.cs │ ├── SecondToStringConverter.cs │ └── TimeSpanToStringConverter.cs ├── DMSkin.Core.csproj ├── MVVM │ ├── DelegateCommand.cs │ └── ViewModelBase.cs ├── Properties │ └── AssemblyInfo.cs ├── TaskManager.cs └── WIN32 │ ├── DesktopAPI.cs │ └── Native.cs ├── DMSkin.Docs └── README.md ├── DMSkin.ScreenShot ├── demo.png ├── demo1.png └── demo2.png ├── DMSkin.WPF.AntDesign ├── DMSkin.WPF.AntDesign.csproj ├── Properties │ └── AssemblyInfo.cs └── Style.xaml ├── DMSkin.WPF.Demos ├── App.xaml ├── App.xaml.cs ├── DMSkin.WPF.Demos.csproj ├── Images │ ├── image1.png │ └── user.jpg ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── StartWindow.xaml ├── StartWindow.xaml.cs ├── ViewModels │ ├── MainWindowViewModel.cs │ ├── PageAboutViewModel.cs │ └── StartWindowViewModel.cs ├── Views │ ├── PageAbout.xaml │ ├── PageAbout.xaml.cs │ ├── PageAnimation.xaml │ ├── PageAnimation.xaml.cs │ ├── PageAntDesign.xaml │ ├── PageAntDesign.xaml.cs │ ├── PageScrollViewer.xaml │ ├── PageScrollViewer.xaml.cs │ ├── PageVirtualizing.xaml │ ├── PageVirtualizing.xaml.cs │ └── Window │ │ ├── ComplexWindow.xaml │ │ ├── ComplexWindow.xaml.cs │ │ ├── SimpleWindow.xaml │ │ └── SimpleWindow.xaml.cs └── app.config ├── DMSkin.WPF ├── Controls │ ├── DMButton.cs │ ├── DMCheckBox.cs │ ├── DMLinkButton.cs │ ├── DMNumericBox.cs │ ├── DMRadioButton.cs │ ├── DMScrollBar.cs │ ├── DMScrollViewer.cs │ ├── DMSystemButton.cs │ ├── DMSystemCloseButton.cs │ ├── DMSystemMaxButton.cs │ ├── DMSystemMinButton.cs │ ├── DMTabItem.cs │ ├── DMTextBox.cs │ ├── DMThumb.cs │ ├── ElasticWrapPanel.cs │ └── VirtualizingWrapPanel .cs ├── DMSkin.WPF.csproj ├── DMSkinComplexWindow.cs ├── DMSkinSimpleWindow.cs ├── Properties │ └── AssemblyInfo.cs ├── ShadowWindow.xaml ├── ShadowWindow.xaml.cs └── Styles │ ├── Animation.xaml │ ├── DMButton.xaml │ ├── DMCheckBox.xaml │ ├── DMContextMenu.xaml │ ├── DMDataGrid.xaml │ ├── DMIcon.xaml │ ├── DMImage.xaml │ ├── DMItemsControl.xaml │ ├── DMListBox.xaml │ ├── DMRadioButton.xaml │ ├── DMResizeGrip.xaml │ ├── DMScrollViewer.xaml │ ├── DMSkin.xaml │ ├── DMSkinSimpleWindow.xaml │ ├── DMSlider.xaml │ ├── DMTabControl.xaml │ ├── DMTextBox.xaml │ ├── DMToolTip.xaml │ └── DMTreeView.xaml ├── LICENSE └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | ############################################################################### 4 | # Set default behavior for command prompt diff. 5 | # 6 | # This is need for earlier builds of msysgit that does not have it on by 7 | # default for csharp files. 8 | # Note: This is only used by command line 9 | ############################################################################### 10 | #*.cs diff=csharp 11 | 12 | ############################################################################### 13 | # Set the merge driver for project and solution files 14 | # 15 | # Merging from the command prompt will add diff markers to the files if there 16 | # are conflicts (Merging from VS is not affected by the settings below, in VS 17 | # the diff markers are never inserted). Diff markers may cause the following 18 | # file extensions to fail to load in VS. An alternative would be to treat 19 | # these files as binary and thus will always conflict and require user 20 | # intervention with every merge. To do so, just uncomment the entries below 21 | ############################################################################### 22 | #*.sln merge=binary 23 | #*.csproj merge=binary 24 | #*.vbproj merge=binary 25 | #*.vcxproj merge=binary 26 | #*.vcproj merge=binary 27 | #*.dbproj merge=binary 28 | #*.fsproj merge=binary 29 | #*.lsproj merge=binary 30 | #*.wixproj merge=binary 31 | #*.modelproj merge=binary 32 | #*.sqlproj merge=binary 33 | #*.wwaproj merge=binary 34 | 35 | ############################################################################### 36 | # behavior for image files 37 | # 38 | # image files are treated as binary by default. 39 | ############################################################################### 40 | #*.jpg binary 41 | #*.png binary 42 | #*.gif binary 43 | 44 | ############################################################################### 45 | # diff behavior for common document formats 46 | # 47 | # Convert binary document formats to text before diffing them. This feature 48 | # is only available from the command line. Turn it on by uncommenting the 49 | # entries below. 50 | ############################################################################### 51 | #*.doc diff=astextplain 52 | #*.DOC diff=astextplain 53 | #*.docx diff=astextplain 54 | #*.DOCX diff=astextplain 55 | #*.dot diff=astextplain 56 | #*.DOT diff=astextplain 57 | #*.pdf diff=astextplain 58 | #*.PDF diff=astextplain 59 | #*.rtf diff=astextplain 60 | #*.RTF diff=astextplain 61 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015/2017 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # Visual Studio 2017 auto generated files 33 | Generated\ Files/ 34 | 35 | # MSTest test Results 36 | [Tt]est[Rr]esult*/ 37 | [Bb]uild[Ll]og.* 38 | 39 | # NUNIT 40 | *.VisualState.xml 41 | TestResult.xml 42 | 43 | # Build Results of an ATL Project 44 | [Dd]ebugPS/ 45 | [Rr]eleasePS/ 46 | dlldata.c 47 | 48 | # Benchmark Results 49 | BenchmarkDotNet.Artifacts/ 50 | 51 | # .NET Core 52 | project.lock.json 53 | project.fragment.lock.json 54 | artifacts/ 55 | **/Properties/launchSettings.json 56 | 57 | # StyleCop 58 | StyleCopReport.xml 59 | 60 | # Files built by Visual Studio 61 | *_i.c 62 | *_p.c 63 | *_i.h 64 | *.ilk 65 | *.meta 66 | *.obj 67 | *.iobj 68 | *.pch 69 | *.pdb 70 | *.ipdb 71 | *.pgc 72 | *.pgd 73 | *.rsp 74 | *.sbr 75 | *.tlb 76 | *.tli 77 | *.tlh 78 | *.tmp 79 | *.tmp_proj 80 | *.log 81 | *.vspscc 82 | *.vssscc 83 | .builds 84 | *.pidb 85 | *.svclog 86 | *.scc 87 | 88 | # Chutzpah Test files 89 | _Chutzpah* 90 | 91 | # Visual C++ cache files 92 | ipch/ 93 | *.aps 94 | *.ncb 95 | *.opendb 96 | *.opensdf 97 | *.sdf 98 | *.cachefile 99 | *.VC.db 100 | *.VC.VC.opendb 101 | 102 | # Visual Studio profiler 103 | *.psess 104 | *.vsp 105 | *.vspx 106 | *.sap 107 | 108 | # Visual Studio Trace Files 109 | *.e2e 110 | 111 | # TFS 2012 Local Workspace 112 | $tf/ 113 | 114 | # Guidance Automation Toolkit 115 | *.gpState 116 | 117 | # ReSharper is a .NET coding add-in 118 | _ReSharper*/ 119 | *.[Rr]e[Ss]harper 120 | *.DotSettings.user 121 | 122 | # JustCode is a .NET coding add-in 123 | .JustCode 124 | 125 | # TeamCity is a build add-in 126 | _TeamCity* 127 | 128 | # DotCover is a Code Coverage Tool 129 | *.dotCover 130 | 131 | # AxoCover is a Code Coverage Tool 132 | .axoCover/* 133 | !.axoCover/settings.json 134 | 135 | # Visual Studio code coverage results 136 | *.coverage 137 | *.coveragexml 138 | 139 | # NCrunch 140 | _NCrunch_* 141 | .*crunch*.local.xml 142 | nCrunchTemp_* 143 | 144 | # MightyMoose 145 | *.mm.* 146 | AutoTest.Net/ 147 | 148 | # Web workbench (sass) 149 | .sass-cache/ 150 | 151 | # Installshield output folder 152 | [Ee]xpress/ 153 | 154 | # DocProject is a documentation generator add-in 155 | DocProject/buildhelp/ 156 | DocProject/Help/*.HxT 157 | DocProject/Help/*.HxC 158 | DocProject/Help/*.hhc 159 | DocProject/Help/*.hhk 160 | DocProject/Help/*.hhp 161 | DocProject/Help/Html2 162 | DocProject/Help/html 163 | 164 | # Click-Once directory 165 | publish/ 166 | 167 | # Publish Web Output 168 | *.[Pp]ublish.xml 169 | *.azurePubxml 170 | # Note: Comment the next line if you want to checkin your web deploy settings, 171 | # but database connection strings (with potential passwords) will be unencrypted 172 | *.pubxml 173 | *.publishproj 174 | 175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 176 | # checkin your Azure Web App publish settings, but sensitive information contained 177 | # in these scripts will be unencrypted 178 | PublishScripts/ 179 | 180 | # NuGet Packages 181 | *.nupkg 182 | # The packages folder can be ignored because of Package Restore 183 | [Pp]ackages/ 184 | # except build/, which is used as an MSBuild target. 185 | !**/[Pp]ackages/build/ 186 | # Uncomment if necessary however generally it will be regenerated when needed 187 | #!**/[Pp]ackages/repositories.config 188 | # NuGet v3's project.json files produces more ignorable files 189 | *.nuget.props 190 | *.nuget.targets 191 | 192 | # Microsoft Azure Build Output 193 | csx/ 194 | *.build.csdef 195 | 196 | # Microsoft Azure Emulator 197 | ecf/ 198 | rcf/ 199 | 200 | # Windows Store app package directories and files 201 | AppPackages/ 202 | BundleArtifacts/ 203 | Package.StoreAssociation.xml 204 | _pkginfo.txt 205 | *.appx 206 | 207 | # Visual Studio cache files 208 | # files ending in .cache can be ignored 209 | *.[Cc]ache 210 | # but keep track of directories ending in .cache 211 | !*.[Cc]ache/ 212 | 213 | # Others 214 | ClientBin/ 215 | ~$* 216 | *~ 217 | *.dbmdl 218 | *.dbproj.schemaview 219 | *.jfm 220 | *.pfx 221 | *.publishsettings 222 | orleans.codegen.cs 223 | 224 | # Including strong name files can present a security risk 225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 226 | #*.snk 227 | 228 | # Since there are multiple workflows, uncomment next line to ignore bower_components 229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 230 | #bower_components/ 231 | 232 | # RIA/Silverlight projects 233 | Generated_Code/ 234 | 235 | # Backup & report files from converting an old project file 236 | # to a newer Visual Studio version. Backup files are not needed, 237 | # because we have git ;-) 238 | _UpgradeReport_Files/ 239 | Backup*/ 240 | UpgradeLog*.XML 241 | UpgradeLog*.htm 242 | ServiceFabricBackup/ 243 | *.rptproj.bak 244 | 245 | # SQL Server files 246 | *.mdf 247 | *.ldf 248 | *.ndf 249 | 250 | # Business Intelligence projects 251 | *.rdl.data 252 | *.bim.layout 253 | *.bim_*.settings 254 | *.rptproj.rsuser 255 | 256 | # Microsoft Fakes 257 | FakesAssemblies/ 258 | 259 | # GhostDoc plugin setting file 260 | *.GhostDoc.xml 261 | 262 | # Node.js Tools for Visual Studio 263 | .ntvs_analysis.dat 264 | node_modules/ 265 | 266 | # Visual Studio 6 build log 267 | *.plg 268 | 269 | # Visual Studio 6 workspace options file 270 | *.opt 271 | 272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 273 | *.vbw 274 | 275 | # Visual Studio LightSwitch build output 276 | **/*.HTMLClient/GeneratedArtifacts 277 | **/*.DesktopClient/GeneratedArtifacts 278 | **/*.DesktopClient/ModelManifest.xml 279 | **/*.Server/GeneratedArtifacts 280 | **/*.Server/ModelManifest.xml 281 | _Pvt_Extensions 282 | 283 | # Paket dependency manager 284 | .paket/paket.exe 285 | paket-files/ 286 | 287 | # FAKE - F# Make 288 | .fake/ 289 | 290 | # JetBrains Rider 291 | .idea/ 292 | *.sln.iml 293 | 294 | # CodeRush 295 | .cr/ 296 | 297 | # Python Tools for Visual Studio (PTVS) 298 | __pycache__/ 299 | *.pyc 300 | 301 | # Cake - Uncomment if you are using it 302 | # tools/** 303 | # !tools/packages.config 304 | 305 | # Tabs Studio 306 | *.tss 307 | 308 | # Telerik's JustMock configuration file 309 | *.jmconfig 310 | 311 | # BizTalk build output 312 | *.btp.cs 313 | *.btm.cs 314 | *.odx.cs 315 | *.xsd.cs 316 | 317 | # OpenCover UI analysis results 318 | OpenCover/ 319 | 320 | # Azure Stream Analytics local run output 321 | ASALocalRun/ 322 | 323 | # MSBuild Binary and Structured Log 324 | *.binlog 325 | 326 | # NVidia Nsight GPU debugger configuration file 327 | *.nvuser 328 | 329 | # MFractors (Xamarin productivity tool) working folder 330 | .mfractor/ 331 | -------------------------------------------------------------------------------- /DMSkin-for-WPF.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27703.2035 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DMSkin.WPF.Demos", "DMSkin.WPF.Demos\DMSkin.WPF.Demos.csproj", "{C758EC5E-4A44-4921-8C8A-2F0127BB9406}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DMSkin.WPF", "DMSkin.WPF\DMSkin.WPF.csproj", "{168352B1-6A0C-4C9C-8A32-68B512DA3CFC}" 9 | EndProject 10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{2DF8544C-E3FF-4A5B-9457-D6ACDA73FD6A}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DMSkin.Core", "DMSkin.Core\DMSkin.Core.csproj", "{13DA6558-356B-47B9-96F2-FE4D5457CB02}" 13 | EndProject 14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DMSkin.WPF.AntDesign", "DMSkin.WPF.AntDesign\DMSkin.WPF.AntDesign.csproj", "{D633FDA6-DDBE-46D6-A3E4-8BCC145935BF}" 15 | EndProject 16 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DMSkin", "DMSkin", "{FA2916B9-1FB8-4B88-A5D5-470D5ED67B48}" 17 | EndProject 18 | Global 19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 20 | Debug|Any CPU = Debug|Any CPU 21 | Debug|x64 = Debug|x64 22 | Debug|x86 = Debug|x86 23 | Release|Any CPU = Release|Any CPU 24 | Release|x64 = Release|x64 25 | Release|x86 = Release|x86 26 | EndGlobalSection 27 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 28 | {C758EC5E-4A44-4921-8C8A-2F0127BB9406}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 29 | {C758EC5E-4A44-4921-8C8A-2F0127BB9406}.Debug|Any CPU.Build.0 = Debug|Any CPU 30 | {C758EC5E-4A44-4921-8C8A-2F0127BB9406}.Debug|x64.ActiveCfg = Debug|x64 31 | {C758EC5E-4A44-4921-8C8A-2F0127BB9406}.Debug|x64.Build.0 = Debug|x64 32 | {C758EC5E-4A44-4921-8C8A-2F0127BB9406}.Debug|x86.ActiveCfg = Debug|x86 33 | {C758EC5E-4A44-4921-8C8A-2F0127BB9406}.Debug|x86.Build.0 = Debug|x86 34 | {C758EC5E-4A44-4921-8C8A-2F0127BB9406}.Release|Any CPU.ActiveCfg = Release|Any CPU 35 | {C758EC5E-4A44-4921-8C8A-2F0127BB9406}.Release|Any CPU.Build.0 = Release|Any CPU 36 | {C758EC5E-4A44-4921-8C8A-2F0127BB9406}.Release|x64.ActiveCfg = Release|x64 37 | {C758EC5E-4A44-4921-8C8A-2F0127BB9406}.Release|x64.Build.0 = Release|x64 38 | {C758EC5E-4A44-4921-8C8A-2F0127BB9406}.Release|x86.ActiveCfg = Release|x86 39 | {C758EC5E-4A44-4921-8C8A-2F0127BB9406}.Release|x86.Build.0 = Release|x86 40 | {168352B1-6A0C-4C9C-8A32-68B512DA3CFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 41 | {168352B1-6A0C-4C9C-8A32-68B512DA3CFC}.Debug|Any CPU.Build.0 = Debug|Any CPU 42 | {168352B1-6A0C-4C9C-8A32-68B512DA3CFC}.Debug|x64.ActiveCfg = Debug|Any CPU 43 | {168352B1-6A0C-4C9C-8A32-68B512DA3CFC}.Debug|x64.Build.0 = Debug|Any CPU 44 | {168352B1-6A0C-4C9C-8A32-68B512DA3CFC}.Debug|x86.ActiveCfg = Debug|Any CPU 45 | {168352B1-6A0C-4C9C-8A32-68B512DA3CFC}.Debug|x86.Build.0 = Debug|Any CPU 46 | {168352B1-6A0C-4C9C-8A32-68B512DA3CFC}.Release|Any CPU.ActiveCfg = Release|Any CPU 47 | {168352B1-6A0C-4C9C-8A32-68B512DA3CFC}.Release|Any CPU.Build.0 = Release|Any CPU 48 | {168352B1-6A0C-4C9C-8A32-68B512DA3CFC}.Release|x64.ActiveCfg = Release|Any CPU 49 | {168352B1-6A0C-4C9C-8A32-68B512DA3CFC}.Release|x64.Build.0 = Release|Any CPU 50 | {168352B1-6A0C-4C9C-8A32-68B512DA3CFC}.Release|x86.ActiveCfg = Release|Any CPU 51 | {168352B1-6A0C-4C9C-8A32-68B512DA3CFC}.Release|x86.Build.0 = Release|Any CPU 52 | {13DA6558-356B-47B9-96F2-FE4D5457CB02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 53 | {13DA6558-356B-47B9-96F2-FE4D5457CB02}.Debug|Any CPU.Build.0 = Debug|Any CPU 54 | {13DA6558-356B-47B9-96F2-FE4D5457CB02}.Debug|x64.ActiveCfg = Debug|Any CPU 55 | {13DA6558-356B-47B9-96F2-FE4D5457CB02}.Debug|x64.Build.0 = Debug|Any CPU 56 | {13DA6558-356B-47B9-96F2-FE4D5457CB02}.Debug|x86.ActiveCfg = Debug|Any CPU 57 | {13DA6558-356B-47B9-96F2-FE4D5457CB02}.Debug|x86.Build.0 = Debug|Any CPU 58 | {13DA6558-356B-47B9-96F2-FE4D5457CB02}.Release|Any CPU.ActiveCfg = Release|Any CPU 59 | {13DA6558-356B-47B9-96F2-FE4D5457CB02}.Release|Any CPU.Build.0 = Release|Any CPU 60 | {13DA6558-356B-47B9-96F2-FE4D5457CB02}.Release|x64.ActiveCfg = Release|Any CPU 61 | {13DA6558-356B-47B9-96F2-FE4D5457CB02}.Release|x64.Build.0 = Release|Any CPU 62 | {13DA6558-356B-47B9-96F2-FE4D5457CB02}.Release|x86.ActiveCfg = Release|Any CPU 63 | {13DA6558-356B-47B9-96F2-FE4D5457CB02}.Release|x86.Build.0 = Release|Any CPU 64 | {D633FDA6-DDBE-46D6-A3E4-8BCC145935BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 65 | {D633FDA6-DDBE-46D6-A3E4-8BCC145935BF}.Debug|Any CPU.Build.0 = Debug|Any CPU 66 | {D633FDA6-DDBE-46D6-A3E4-8BCC145935BF}.Debug|x64.ActiveCfg = Debug|Any CPU 67 | {D633FDA6-DDBE-46D6-A3E4-8BCC145935BF}.Debug|x64.Build.0 = Debug|Any CPU 68 | {D633FDA6-DDBE-46D6-A3E4-8BCC145935BF}.Debug|x86.ActiveCfg = Debug|Any CPU 69 | {D633FDA6-DDBE-46D6-A3E4-8BCC145935BF}.Debug|x86.Build.0 = Debug|Any CPU 70 | {D633FDA6-DDBE-46D6-A3E4-8BCC145935BF}.Release|Any CPU.ActiveCfg = Release|Any CPU 71 | {D633FDA6-DDBE-46D6-A3E4-8BCC145935BF}.Release|Any CPU.Build.0 = Release|Any CPU 72 | {D633FDA6-DDBE-46D6-A3E4-8BCC145935BF}.Release|x64.ActiveCfg = Release|Any CPU 73 | {D633FDA6-DDBE-46D6-A3E4-8BCC145935BF}.Release|x64.Build.0 = Release|Any CPU 74 | {D633FDA6-DDBE-46D6-A3E4-8BCC145935BF}.Release|x86.ActiveCfg = Release|Any CPU 75 | {D633FDA6-DDBE-46D6-A3E4-8BCC145935BF}.Release|x86.Build.0 = Release|Any CPU 76 | EndGlobalSection 77 | GlobalSection(SolutionProperties) = preSolution 78 | HideSolutionNode = FALSE 79 | EndGlobalSection 80 | GlobalSection(NestedProjects) = preSolution 81 | {C758EC5E-4A44-4921-8C8A-2F0127BB9406} = {2DF8544C-E3FF-4A5B-9457-D6ACDA73FD6A} 82 | {168352B1-6A0C-4C9C-8A32-68B512DA3CFC} = {FA2916B9-1FB8-4B88-A5D5-470D5ED67B48} 83 | {13DA6558-356B-47B9-96F2-FE4D5457CB02} = {FA2916B9-1FB8-4B88-A5D5-470D5ED67B48} 84 | {D633FDA6-DDBE-46D6-A3E4-8BCC145935BF} = {FA2916B9-1FB8-4B88-A5D5-470D5ED67B48} 85 | EndGlobalSection 86 | GlobalSection(ExtensibilityGlobals) = postSolution 87 | SolutionGuid = {6069BA25-CF28-480D-A274-F643B7FADE0D} 88 | EndGlobalSection 89 | EndGlobal 90 | -------------------------------------------------------------------------------- /DMSkin.Core/Common/Base64.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | 4 | namespace DMSkin.Core.Commom 5 | { 6 | public sealed class Base64 7 | { 8 | /// 9 | /// Base64加密 10 | /// 11 | /// 加密采用的编码方式 12 | /// 待加密的明文 13 | /// 返回加密的文本 14 | public static string EncodeBase64(Encoding encode, string source) 15 | { 16 | byte[] bytes = encode.GetBytes(source); 17 | try 18 | { 19 | source = Convert.ToBase64String(bytes); 20 | } 21 | catch 22 | { 23 | 24 | } 25 | return source; 26 | } 27 | 28 | /// 29 | /// Base64加密,采用utf8编码方式加密 30 | /// 31 | /// 待加密的明文 32 | /// 加密后的字符串 33 | public static string EncodeBase64(string source) 34 | { 35 | return EncodeBase64(Encoding.UTF8, source); 36 | } 37 | 38 | /// 39 | /// Base64解密 40 | /// 41 | /// 解密采用的编码方式,注意和加密时采用的方式一致 42 | /// 待解密的密文 43 | /// 解密后的字符串 44 | public static string DecodeBase64(Encoding encode, string result) 45 | { 46 | string decode = ""; 47 | byte[] bytes = Convert.FromBase64String(result); 48 | try 49 | { 50 | decode = encode.GetString(bytes); 51 | } 52 | catch 53 | { 54 | decode = result; 55 | } 56 | return decode; 57 | } 58 | 59 | /// 60 | /// Base64解密,采用utf8编码方式解密 61 | /// 62 | /// 待解密的密文 63 | /// 解密后的字符串 64 | public static string DecodeBase64(string result) 65 | { 66 | return DecodeBase64(Encoding.UTF8, result); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /DMSkin.Core/Common/Execute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Threading; 3 | 4 | namespace DMSkin.Core.Common 5 | { 6 | public static class Execute 7 | { 8 | private static Action executor = (action, async) => action(); 9 | /// 10 | /// 初始化UI调度器 11 | /// 12 | public static void InitializeWithDispatcher() 13 | { 14 | var dispatcher = Dispatcher.CurrentDispatcher; 15 | executor = (action, async) => 16 | { 17 | //确认是当前的线程 18 | if (dispatcher.CheckAccess()) 19 | { 20 | action(); 21 | } 22 | else 23 | { 24 | //异步执行 25 | if (async) 26 | { 27 | dispatcher.BeginInvoke(action); 28 | } 29 | else 30 | { 31 | dispatcher.Invoke(action); 32 | } 33 | } 34 | }; 35 | } 36 | 37 | /// 38 | /// UI线程中执行方法 39 | /// 40 | public static void OnUIThread(this Action action,bool async = false) 41 | { 42 | executor(action,async); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /DMSkin.Core/Common/UINT.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace DMSkin.Core.Common 7 | { 8 | public class UINT 9 | { 10 | /// 11 | /// 将数据转换为 12 | /// 13 | /// 数值 14 | /// 从类型 15 | /// 到类型 16 | /// 小数点后位数 17 | public static string ToSize(UINTYPE fromtype,double size,int count = 2) 18 | { 19 | double temp = size; 20 | double mod = 1024.0; 21 | switch (fromtype) 22 | { 23 | case UINTYPE.KB: 24 | temp = size * mod; 25 | break; 26 | case UINTYPE.MB: 27 | temp = size * mod * mod; 28 | break; 29 | case UINTYPE.GB: 30 | temp = size * mod * mod * mod; 31 | break; 32 | } 33 | 34 | string[] units = new string[] { "B", "KB", "MB", "GB", "TB"}; 35 | int i = 0; 36 | while (temp >= mod) 37 | { 38 | temp /= mod; 39 | i++; 40 | } 41 | return Math.Round(temp,count) + units[i]; 42 | } 43 | } 44 | 45 | public enum UINTYPE 46 | { 47 | B, 48 | KB, 49 | MB, 50 | GB 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /DMSkin.Core/Converters/BoolToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace DMSkin.Core.Converters 7 | { 8 | /// 9 | /// Bool 转换 为 Visibility 10 | /// 11 | public class BoolToVisibilityConverter : IValueConverter 12 | { 13 | /// 14 | /// 转换函数 15 | /// 16 | /// 只要有值就会被反转 - 相当于取反 17 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 18 | { 19 | if (value is bool b && b) 20 | { 21 | return ConvertFun(Visibility.Visible, parameter); 22 | } 23 | return ConvertFun(Visibility.Collapsed, parameter); 24 | } 25 | 26 | public object ConvertFun(Visibility visibility, object parameter) 27 | { 28 | //有command参数 取反值 29 | if (parameter is string p)//取反值 30 | { 31 | if (visibility == Visibility.Visible) 32 | { 33 | return Visibility.Collapsed; 34 | } 35 | return Visibility.Visible; 36 | } 37 | return visibility; 38 | } 39 | 40 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 41 | { 42 | return value != null && value.Equals(true) ? parameter : Binding.DoNothing; 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /DMSkin.Core/Converters/CompareToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Windows; 7 | using System.Windows.Data; 8 | using Converts = System.Convert; 9 | 10 | namespace DMSkin.Core.Converters 11 | { 12 | /// 13 | /// 比较数字大小 返回是否显示的转换器 14 | /// 例:当界面尺寸大于某个值的时候显示某些东西。 15 | /// 16 | public class CompareToVisibilityConverter : IValueConverter 17 | { 18 | /// 19 | /// 转换函数 20 | /// 21 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 22 | { 23 | try 24 | { 25 | double v1 = Converts.ToDouble(value); 26 | double v2 = Converts.ToDouble(parameter); 27 | if (v1 > v2) 28 | { 29 | return Visibility.Visible; 30 | } 31 | } 32 | catch (Exception) 33 | { 34 | 35 | } 36 | return Visibility.Collapsed; 37 | } 38 | 39 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 40 | { 41 | return Binding.DoNothing; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /DMSkin.Core/Converters/EnumToBooleanConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | 5 | namespace DMSkin.Core.Converters 6 | { 7 | public class EnumToBooleanConverter : IValueConverter 8 | { 9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 10 | { 11 | if (value == null||value.ToString()!=parameter.ToString()) 12 | { 13 | return false; 14 | } 15 | return true; 16 | } 17 | 18 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 19 | { 20 | return value != null && value.Equals(true) ? parameter : Binding.DoNothing; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /DMSkin.Core/Converters/EnumToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace DMSkin.Core.Converters 7 | { 8 | /// 9 | /// 将枚举值 转换为 是否显示 10 | /// 11 | public class EnumToVisibilityConverter : IValueConverter 12 | { 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | if (value == null||value.ToString()!=parameter.ToString()) 16 | { 17 | return Visibility.Collapsed; 18 | } 19 | return Visibility.Visible; 20 | } 21 | 22 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 23 | { 24 | return value != null && value.Equals(true) ? parameter : Binding.DoNothing; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /DMSkin.Core/Converters/SecondToStringConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Windows.Data; 7 | 8 | namespace DMSkin.Core.Converters 9 | { 10 | /// 11 | /// 将秒数 转换 为时间显示 00:10:00 12 | /// 13 | public class SecondToStringConverter : IValueConverter 14 | { 15 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | if (value is int offset) 18 | { 19 | var absOffset = Math.Abs(offset); 20 | var hour = ((absOffset / 3600)).ToString(); 21 | var minute = ((absOffset - ((absOffset / 3600) * 3600)) / 60).ToString(); 22 | var second = ((absOffset - ((absOffset / 3600) * 3600)) % 60).ToString(); 23 | return $"{(offset >= 0 ? "" : "-")}{hour.PadLeft(2, '0')}:{minute.PadLeft(2, '0')}:{second.PadLeft(2, '0')}"; 24 | } 25 | return value; 26 | } 27 | 28 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 29 | { 30 | var arr = (value as string)?.Split(':'); 31 | if (arr?.Length == 2) 32 | { 33 | long hour, minute; 34 | if (Int64.TryParse(arr[0], out hour) && Int64.TryParse(arr[1], out minute)) 35 | { 36 | return hour * 3600 + minute * 60; 37 | } 38 | } 39 | return value; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /DMSkin.Core/Converters/TimeSpanToStringConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | 5 | namespace DMSkin.Core.Converters 6 | { 7 | /// 8 | /// 将TimeSpan 转换为 00:00 9 | /// 10 | [ValueConversion(typeof(DateTime?), typeof(string))] 11 | public class TimeSpanToStringConverter : IValueConverter 12 | { 13 | #region Implementation of IValueConverter 14 | 15 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | var date = (TimeSpan)value; 18 | return date.ToString(@"mm\:ss\ "); 19 | } 20 | 21 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 22 | { 23 | throw new NotSupportedException(); 24 | } 25 | #endregion 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /DMSkin.Core/DMSkin.Core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {13DA6558-356B-47B9-96F2-FE4D5457CB02} 8 | Library 9 | Properties 10 | DMSkin.Core 11 | DMSkin.Core 12 | v4.0 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | false 26 | 27 | 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | false 35 | 36 | 37 | true 38 | bin\x86\Debug\ 39 | DEBUG;TRACE 40 | full 41 | x86 42 | prompt 43 | MinimumRecommendedRules.ruleset 44 | false 45 | 46 | 47 | bin\x86\Release\ 48 | TRACE 49 | true 50 | pdbonly 51 | x86 52 | prompt 53 | MinimumRecommendedRules.ruleset 54 | false 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /DMSkin.Core/MVVM/DelegateCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Input; 3 | 4 | namespace DMSkin.Core.MVVM 5 | { 6 | public class DelegateCommand : ICommand 7 | { 8 | private Action executeAction; 9 | private Func canExecuteFunc; 10 | public event EventHandler CanExecuteChanged; 11 | public DelegateCommand(Action execute) 12 | : this(execute, null) 13 | { } 14 | public DelegateCommand(Action execute, Func canExecute) 15 | { 16 | if (execute == null) 17 | { 18 | return; 19 | } 20 | executeAction = execute; 21 | canExecuteFunc = canExecute; 22 | } 23 | public bool CanExecute(object parameter) 24 | { 25 | if (canExecuteFunc == null) 26 | { 27 | return true; 28 | } 29 | return canExecuteFunc(parameter); 30 | } 31 | public void Execute(object parameter) 32 | { 33 | if (executeAction == null) 34 | { 35 | return; 36 | } 37 | executeAction(parameter); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /DMSkin.Core/MVVM/ViewModelBase.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace DMSkin.Core.MVVM 4 | { 5 | public class ViewModelBase : INotifyPropertyChanged 6 | { 7 | #region UI更新接口 8 | public event PropertyChangedEventHandler PropertyChanged; 9 | protected virtual void OnPropertyChanged(string propertyName = null) 10 | { 11 | if (PropertyChanged != null) 12 | PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName)); 13 | } 14 | #endregion 15 | 16 | #region 是否正在加载 17 | private bool isLoad; 18 | 19 | /// 20 | /// 是否加载 21 | /// 22 | public bool IsLoad 23 | { 24 | get { return isLoad; } 25 | set 26 | { 27 | isLoad = value; 28 | OnPropertyChanged(nameof(IsLoad)); 29 | } 30 | } 31 | #endregion 32 | 33 | #region 是否需要刷新 34 | private bool update; 35 | /// 36 | /// 刷新 37 | /// 38 | public bool Update 39 | { 40 | get { return update; } 41 | set 42 | { 43 | update = value; 44 | OnPropertyChanged(nameof(Update)); 45 | } 46 | } 47 | #endregion 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /DMSkin.Core/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("DMSkin.Core")] 9 | [assembly: AssemblyDescription("Dream.Machine QQ944095635")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Dream.Machine")] 12 | [assembly: AssemblyProduct("DMSkin.Core")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("13da6558-356b-47b9-96f2-fe4d5457cb02")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("2.5.1.4")] 36 | [assembly: AssemblyFileVersion("2.5.1.4")] 37 | -------------------------------------------------------------------------------- /DMSkin.Core/TaskManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading; 6 | using System.Threading.Tasks; 7 | 8 | namespace DMSkin.Core 9 | { 10 | public class TaskManager 11 | { 12 | /// 13 | /// 创建一个超时任务 14 | /// 15 | /// 执行的函数 16 | /// 超时时间 17 | public static bool Wait(Action action,int timeOut) 18 | { 19 | Task taskWait = new Task(()=> 20 | { 21 | action(); 22 | }); 23 | 24 | Task taskTime = new Task(() => 25 | { 26 | Thread.Sleep(timeOut); 27 | }); 28 | 29 | taskWait.Start(); 30 | taskTime.Start(); 31 | 32 | if (Task.WaitAny(taskWait, taskTime)==0) 33 | { 34 | return true; 35 | } 36 | return false; 37 | } 38 | 39 | /// 40 | /// 延迟执行 41 | /// 42 | /// 43 | /// 44 | public static void Delay(Action action, int time) 45 | { 46 | Task taskWait = new Task(() => 47 | { 48 | Thread.Sleep(time); 49 | action(); 50 | }); 51 | taskWait.Start(); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /DMSkin.Core/WIN32/DesktopAPI.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DMSkin.Core.WIN32 4 | { 5 | public class DesktopAPI 6 | { 7 | /// 8 | /// 初始化 9 | /// 10 | public static void Initialization(IntPtr Handle) 11 | { 12 | //获取所有屏幕 13 | //Screen[] allScreens = Screen.AllScreens; 14 | //所有屏幕 15 | //int count = allScreens.Length; 16 | //拿到程序管理器句柄 17 | IntPtr progman = NativeMethods.FindWindow("Progman", null); 18 | NativeMethods.SendMessageTimeout(progman, (uint)0x052C, new UIntPtr(0), IntPtr.Zero, SendMessageTimeoutFlags.SMTO_NORMAL, 1000, out UIntPtr result); 19 | NativeMethods.SetParent(Handle, FindWorkerWPtr()); 20 | } 21 | 22 | /// 23 | /// 查找工作区域 24 | /// 25 | public static IntPtr FindWorkerWPtr() 26 | { 27 | IntPtr workerw = IntPtr.Zero; 28 | IntPtr def = IntPtr.Zero; 29 | IntPtr intPtr = NativeMethods.FindWindow("Progman", null); 30 | //http://blog.csdn.net/whatday/article/details/8714573 31 | IntPtr zeroResult = IntPtr.Zero; 32 | //遍历窗体 33 | NativeMethods.EnumWindows(delegate (IntPtr handle, IntPtr param) 34 | { 35 | //TODO 双屏问题 36 | //参考:http://blog.csdn.net/zhoufoxcn/article/details/2515753,获取墙纸的窗体下面的一个窗体句柄 37 | if ((def = NativeMethods.FindWindowEx(handle, IntPtr.Zero, "SHELLDLL_DefView", IntPtr.Zero)) != IntPtr.Zero) 38 | { 39 | workerw = NativeMethods.FindWindowEx(IntPtr.Zero, handle, "WorkerW", IntPtr.Zero); 40 | //得到 41 | Console.Write("workerw:" + workerw + "\n"); 42 | NativeMethods.ShowWindow(workerw, 0); 43 | } 44 | return true; 45 | }, IntPtr.Zero); 46 | 47 | return intPtr; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /DMSkin.Docs/README.md: -------------------------------------------------------------------------------- 1 | # DMSkin-for-WPF 2 | 3 | ![](https://img.shields.io/badge/.NET-%3E%3D3.5-brightgreen.svg) 4 | ![](https://img.shields.io/badge/version-2.5.1.1-blue.svg) 5 | ![](https://img.shields.io/badge/license-MIT-green.svg) 6 | 7 | #### 一个强大的WPF无边框窗体框架和控件库组合。 8 | 9 | 10 | 11 | 12 | ## 前言 13 | DMSkin-for-WPF (简称 DFW) 是一个强大的WPF无边框窗体框架和控件库组合。支持窗体阴影、窗体过渡动画,自带优雅的控件库,旨在帮助开发者更加高效、迅速地创建出优美的WPF界面。 14 | 15 | ## 支持的 **`.NET Framework 3.5`** 到 **`.NET Framework 3.5 4.7`**,并支持从Windows XP到Window 10的所有系统版本。 16 | 17 | ## 如果你的软件仅仅考虑兼容 Windows10 + ,.NET Framework 4.5+,可以考虑使用官网方案:[WindowChrome](https://github.com/944095635/WindowChrome-Demo),但是这些库在Windows7 上面不会产生阴影。(.NET Framework 3.5 可以使用System.Windows.Shell实现) 18 | 19 | DFW为窗体无边框提供了两种方案: 20 | #### 1. 双层方案 21 | 使用Win 32 API重绘非客户区,然后创建一个单独的窗体去绘制阴影。 22 | #### 2. 单层方案 23 | 延迟Windows消息以防止由于设置窗体属性为`AllowsTransparency=true`, `WindowStyle=None`而导致的闪烁花屏Bug。 24 | 25 | 下面的表格可以很直观地说明双层方案和单层方案的区别: 26 | 27 | | 方案 | 是否支持窗体透明 |是否支持窗体动画 |对系统的支持程度 | 28 | | :----: | :---: | :----: | :----: | 29 | | DMSkinComplexWindow |不支持 | 支持 | 在Win7上会有Bug | 30 | | DMSkinSimpleWindow | 支持 |不支持 | 支持Windows所有版本 | 31 | 32 | ## 注意 33 | #### 1. DFW基于VS 2017社区版开发,.NET 4.0开发环境,源码包括一些c# 6.0+语法,如果你在VS 2015甚至更低的VS版本上编译不通过的话,请自行修改中源码不兼容的部分。 34 | #### 2. 双层方案仍然有点缺陷,在Win7上非客户区的系统按钮会阻挡操作。 35 | ## 安装 36 | 你可以通过以下两种方式获取 **`DMSkin.WPF.dll`**: 37 | 38 | #### 1. [直接下载 DMSkin.WPF.dll](https://github.com/944095635/DMSkin-for-WPF/releases/download/2.5.0.1/Release.zip) 39 | 40 | 这种方式的缺点是你下载到的**dll**并不总是最新的。 41 | 42 | #### 2. [下载源码](https://github.com/944095635/DMSkin-for-WPF/archive/master.zip) 然后自己编译 43 | 点击 `DMSkin-for-WPF.sln` 打开项目, 右击解决方案资源管理器上的DMSkin.WPF 然后点击**生成**按钮即可编译获得**dll**文件. 接着打开资源管理器,你会发现 `bin\Debug`目录下已经多了一个DMSkin.WPF.dll. 44 | 45 | 还有一些其它的方法可以获取到 `DMSkin.WPF.dll`和源码: 46 | 47 | - Nuget `PM> Install-Package DMSkin.WPF -Version 2.5.0.4` 48 | - Git `git clone git@github.com:944095635/DMSkin-for-WPF.git` 49 | 50 | ## 用法 & 配置 51 | #### 1. 创建一个WPF项目 52 | #### 2. [添加 DMSkin.WPF.dll 引用](https://www.jb51.net/softjc/466183.html) 53 | #### 3. 添加 App.xaml Resources 54 | ````xml 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | ```` 92 | #### 4. 修改 `MainWindow.cs` 93 | 这里以引入单层方案 `DMSkinSimpleWindow` 为例,使用双层方案将`DMSkinSimpleWindow`改成`DMComplexWindow`即可。 94 | ````csharp 95 | + using DMSkin.WPF; 96 | using System.Windows; 97 | 98 | namespace DMSkinTest 99 | { 100 | - public partial class MainWindow : Window 101 | + public partial class MainWindow : DMSkinSimpleWindow 102 | { 103 | public MainWindow() 104 | { 105 | InitializeComponent(); 106 | } 107 | } 108 | } 109 | ```` 110 | 111 | #### 5. 修改 `MainWindow.xaml` 112 | ````xml 113 | - 116 | + xmlns:DMSkin="clr-namespace:DMSkin.WPF;assembly=DMSkin.WPF" 117 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 118 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 119 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 120 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 121 | mc:Ignorable="d"> 122 | 123 | 124 | 125 | - 126 | + 127 | ```` 128 | 若想使用双层方案,需要将上方的`DMSkinSimpleWindow`改成`DMComplexWindow`。 129 | #### 6. 添加系统按钮 (可选) 130 | ````xml 131 | 132 | 139 | 141 | 143 | 144 | 146 | 147 | 149 | 150 | 151 | ```` 152 | 153 | #### 7. 配置你的 DFW 窗体属性 (可选) 154 | ````js 155 | DMWindowShadowSize="10" // 窗体阴影大小 156 | DMWindowShadowColor="#FFC8C8C8" // 窗体阴影颜色 157 | DMWindowShadowOpacity="0.8" // 窗体阴影透明度 158 | DMWindowShadowDragVisibility="False" // 当窗体被拖动时是否显示阴影 159 | DMWindowShadowVisibility="False" // 是否显示窗体阴影 160 | DMWindowShadowBackColor="#FF323CAD" // 阴影背景色 (只对双层方案有效) 161 | ```` 162 | 163 | #### 8.制作圆角窗体 (可选) 164 | ````xml 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 181 | 182 | 183 | ```` 184 | 185 | ## 效果预览 186 | 187 | 188 | 189 | 190 | 191 | 192 | ## 联系 193 | 欢迎加入我们: 194 | 195 | - **[C# .NET (2000人) QQ交流群](http://qm.qq.com/cgi-bin/qm/qr?k=reTIeglEELMIW267mOO7amouFFwhJwwP)** 196 | 197 | - **DMSkin QQ交流群: 194684812** 198 | 199 | - **WPF 课程学习群 (收费): 611509631** 200 | - **联系作者** 201 | - **[DMSkin官方网站](http://www.dmskin.com)** 202 | 203 | ## 捐赠 204 | 如果你觉得这个框架真的对你很有帮助,欢迎给我捐赠,这将鼓励我做的更好! 205 | 206 | 207 | 208 | ## 更新日志 209 | ### 2.5.1.0 (2018-11-06) 210 | 1.优化代码(当前版本号) 211 | 2.新增网易云Resizegrip 212 | 213 | ### 2.5.0 (2018-06-07) 214 | 1. 将2个项目合二为一。 215 | 216 | 2. 添加一些WPF 常用的class 如ViewModelBase,UI调度器,转换器。 217 | 218 | 3. 加入了水印输入框等,代码重构,准备发布到Nuget,以后可以通过Nuget安装 和 更新。 219 | 220 | ### 2.1.0 (2018-04-17) 221 | 1. 修改逻辑,目前窗口支持MVVM。 222 | 223 | 2. 修复一个启动时阴影分层的BUG。 224 | 225 | 3. 系统按钮被分离出窗口模板,具体查看本文底部使用方法。 226 | 227 | ### 2.0.1 (2018-01-30) 228 | 1. 新增一个窗口Demo。 229 | 230 | ### 2.0.0 (2017-10-15) 231 | 1. 移除WindowMode。 232 | 233 | 2. 目前WIN7有点小瑕疵。 234 | 235 | ### 1.3.0 (2017-09-21) 236 | 1. Win7以及以下采用单层。 237 | 238 | 2. Win8、Win10采用双层。 239 | 240 | ### 1.2.4 (2017-09-21) 241 | 1. 窗口边缘拉伸(右,右下,下)。 242 | 243 | 2. 阴影恢复速度调为200ms。 244 | 245 | 3. 阴影可以完全关闭(高效率,配合窗口虚线使用)。 246 | 247 | ### 1.1.3 (2017-09-20) 248 | 1. 修复ALT+TAB 出现2个窗体的BUG。 249 | 250 | 2. 阴影层背景色,拉伸 拖拽时 出现的颜色。选择跟主窗体 接近的颜色 用户体验更好。 251 | 252 | ### 1.1.2 (2017-09-20) 253 | 1. 修复多个窗口无法激活聚焦的BUG。 254 | 255 | 2. 拖动窗口支持显示阴影层。 256 | 257 | 3. 阴影层延迟显示的BUG修复。 258 | 259 | ### 1.1.1 (2017-09-19) 260 | 1. 优化最小化恢复阴影顺序,不会像网易云音乐一样出现双层了。 261 | 262 | 2. 去除窗口裁剪代码(之前的裁剪操作多此一举)。 263 | 264 | 3. 拖动窗口位置时隐藏阴影提高效率。 265 | 266 | ### 1.0.0 (2017-09-13) 267 | 1. 最小化动画终于解决,此方案可以移植到winform无边框中,这是我所知道的世界第一例WPF/winfrom无边框最小化动画方案。 268 | 269 | **备注:** 270 | 271 | 【1.0版本】采用双层窗体+Win32实现无边框,1.0版本不支持圆角窗体,不支持窗体透明,但是拥有完美最小化的动画。如果采用虚线边框,则可以去除双层窗体。 272 | 273 | 【1.0版本之前】采用WindowStyle.None + 透明实现无边框,版本缺陷是无边框通病,窗体最小化 动画失效了。但是我用xaml实现了动画(动画流畅程度取决于显卡)。 274 | 275 | ### 0.8.0 (2017-08-26) 276 | 1. 修复最小化动画以及恢复动画(尚可优化)。 277 | 278 | ### 0.7.0 (2017-08-25) 279 | 1. 代码托管到GITHUB。 280 | 281 | 2. 新增Demo:周杰伦音乐播放器。 282 | 283 | 3. 新增Demo:默认模板窗体。 284 | 285 | ### 0.6.0 (2017-03-06) 286 | 1. 新增DMSystemButtonHoverColor 系统按钮鼠标悬浮的背景色(圆角窗体请设为透明,效果更好)。 287 | 288 | 2. 新增窗体模式:扁平化Metro+阴影Shadow 2种风格窗体。 289 | 290 | 291 | ## MIT License 292 | Copyright © 2018 293 | 294 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 295 | 296 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 297 | 298 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 299 | -------------------------------------------------------------------------------- /DMSkin.ScreenShot/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/944095635/DMSkin-for-WPF/189811e5e1c1da65c087d64fe396a91137a26eb5/DMSkin.ScreenShot/demo.png -------------------------------------------------------------------------------- /DMSkin.ScreenShot/demo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/944095635/DMSkin-for-WPF/189811e5e1c1da65c087d64fe396a91137a26eb5/DMSkin.ScreenShot/demo1.png -------------------------------------------------------------------------------- /DMSkin.ScreenShot/demo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/944095635/DMSkin-for-WPF/189811e5e1c1da65c087d64fe396a91137a26eb5/DMSkin.ScreenShot/demo2.png -------------------------------------------------------------------------------- /DMSkin.WPF.AntDesign/DMSkin.WPF.AntDesign.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {D633FDA6-DDBE-46D6-A3E4-8BCC145935BF} 8 | Library 9 | Properties 10 | DMSkin.WPF.AntDesign 11 | DMSkin.WPF.AntDesign 12 | v4.0 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | MSBuild:Compile 53 | Designer 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /DMSkin.WPF.AntDesign/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("DMSkin.WPF.AntDesign")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("DMSkin.WPF.AntDesign")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("d633fda6-ddbe-46d6-a3e4-8bcc145935bf")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/App.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using DMSkin.Core.Common; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Configuration; 5 | using System.Data; 6 | using System.Linq; 7 | using System.Windows; 8 | 9 | namespace DMSkin.WPF.Demos 10 | { 11 | public partial class App : Application 12 | { 13 | protected override void OnStartup(StartupEventArgs e) 14 | { 15 | //初始化UI Dispatcher 16 | Execute.InitializeWithDispatcher(); 17 | 18 | ShutdownMode = ShutdownMode.OnLastWindowClose; 19 | 20 | //启动窗口 21 | StartWindow st= new StartWindow(); 22 | st.Show(); 23 | 24 | //ComplexWindow c = new ComplexWindow(); 25 | //c.Show(); 26 | 27 | //SimpleMainWindow s = new SimpleMainWindow(); 28 | //s.Show(); 29 | 30 | //DemoWindow d = new DemoWindow(); 31 | //d.Show(); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/DMSkin.WPF.Demos.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {C758EC5E-4A44-4921-8C8A-2F0127BB9406} 8 | WinExe 9 | DMSkin.WPF.Demos 10 | DMSkin.WPF.Demos 11 | v4.5 12 | 512 13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 14 | 4 15 | 16 | 17 | 18 | 19 | 20 | AnyCPU 21 | true 22 | full 23 | false 24 | bin\Debug\ 25 | DEBUG;TRACE 26 | prompt 27 | 4 28 | false 29 | 30 | 31 | AnyCPU 32 | pdbonly 33 | true 34 | bin\Release\ 35 | TRACE 36 | prompt 37 | 4 38 | false 39 | 40 | 41 | true 42 | bin\x86\Debug\ 43 | DEBUG;TRACE 44 | full 45 | x86 46 | prompt 47 | MinimumRecommendedRules.ruleset 48 | false 49 | 50 | 51 | bin\x86\Release\ 52 | TRACE 53 | true 54 | pdbonly 55 | x86 56 | prompt 57 | MinimumRecommendedRules.ruleset 58 | false 59 | 60 | 61 | true 62 | bin\x64\Debug\ 63 | DEBUG;TRACE 64 | full 65 | x64 66 | prompt 67 | MinimumRecommendedRules.ruleset 68 | false 69 | 70 | 71 | bin\x64\Release\ 72 | TRACE 73 | true 74 | pdbonly 75 | x64 76 | prompt 77 | MinimumRecommendedRules.ruleset 78 | false 79 | 80 | 81 | DMSkin.WPF.Demos.App 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 4.0 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | MSBuild:Compile 101 | Designer 102 | 103 | 104 | StartWindow.xaml 105 | 106 | 107 | 108 | PageAbout.xaml 109 | 110 | 111 | PageAnimation.xaml 112 | 113 | 114 | PageAntDesign.xaml 115 | 116 | 117 | PageScrollViewer.xaml 118 | 119 | 120 | PageVirtualizing.xaml 121 | 122 | 123 | SimpleWindow.xaml 124 | 125 | 126 | 127 | 128 | MSBuild:Compile 129 | Designer 130 | 131 | 132 | Designer 133 | MSBuild:Compile 134 | 135 | 136 | Designer 137 | MSBuild:Compile 138 | 139 | 140 | Designer 141 | MSBuild:Compile 142 | 143 | 144 | Designer 145 | MSBuild:Compile 146 | 147 | 148 | Designer 149 | MSBuild:Compile 150 | 151 | 152 | MSBuild:Compile 153 | Designer 154 | 155 | 156 | MSBuild:Compile 157 | Designer 158 | 159 | 160 | App.xaml 161 | Code 162 | 163 | 164 | ComplexWindow.xaml 165 | Code 166 | 167 | 168 | 169 | 170 | Code 171 | 172 | 173 | True 174 | True 175 | Resources.resx 176 | 177 | 178 | True 179 | Settings.settings 180 | True 181 | 182 | 183 | ResXFileCodeGenerator 184 | Resources.Designer.cs 185 | 186 | 187 | 188 | SettingsSingleFileGenerator 189 | Settings.Designer.cs 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | {13DA6558-356B-47B9-96F2-FE4D5457CB02} 198 | DMSkin.Core 199 | 200 | 201 | {d633fda6-ddbe-46d6-a3e4-8bcc145935bf} 202 | DMSkin.WPF.AntDesign 203 | 204 | 205 | {168352b1-6a0c-4c9c-8a32-68b512da3cfc} 206 | DMSkin.WPF 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/Images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/944095635/DMSkin-for-WPF/189811e5e1c1da65c087d64fe396a91137a26eb5/DMSkin.WPF.Demos/Images/image1.png -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/Images/user.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/944095635/DMSkin-for-WPF/189811e5e1c1da65c087d64fe396a91137a26eb5/DMSkin.WPF.Demos/Images/user.jpg -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // 有关程序集的一般信息由以下 8 | // 控制。更改这些特性值可修改 9 | // 与程序集关联的信息。 10 | [assembly: AssemblyTitle("DMSkin.WPF.Demos")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("DMSkin.WPF.Demos")] 15 | [assembly: AssemblyCopyright("Copyright © 2017")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // 将 ComVisible 设置为 false 会使此程序集中的类型 20 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 21 | //请将此类型的 ComVisible 特性设置为 true。 22 | [assembly: ComVisible(false)] 23 | 24 | //若要开始生成可本地化的应用程序,请设置 25 | //.csproj 文件中的 CultureYouAreCodingWith 26 | //例如,如果您在源文件中使用的是美国英语, 27 | //使用的是美国英语,请将 设置为 en-US。 然后取消 28 | //对以下 NeutralResourceLanguage 特性的注释。 更新 29 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置 36 | //(未在页面中找到资源时使用, 37 | //或应用程序资源字典中找到时使用) 38 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 39 | //(未在页面中找到资源时使用, 40 | //、应用程序或任何主题专用资源字典中找到时使用) 41 | )] 42 | 43 | 44 | // 程序集的版本信息由下列四个值组成: 45 | // 46 | // 主版本 47 | // 次版本 48 | // 生成号 49 | // 修订号 50 | // 51 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 52 | // 方法是按如下所示使用“*”: : 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("2.5.0.7")] 55 | [assembly: AssemblyFileVersion("2.5.0.7")] 56 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DMSkin.WPF.Demos.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// 一个强类型的资源类,用于查找本地化的字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// 返回此类使用的缓存的 ResourceManager 实例。 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DMSkin.WPF.Demos.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// 重写当前线程的 CurrentUICulture 属性 51 | /// 重写当前线程的 CurrentUICulture 属性。 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DMSkin.WPF.Demos.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/StartWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace DMSkin.WPF.Demos 2 | { 3 | public partial class StartWindow 4 | { 5 | public StartWindow() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/ViewModels/MainWindowViewModel.cs: -------------------------------------------------------------------------------- 1 | using DMSkin.Core.MVVM; 2 | using System.Windows; 3 | using System.Windows.Input; 4 | 5 | namespace DM_Studio.ViewModels 6 | { 7 | public class MainWindowViewModel 8 | { 9 | public ICommand F1Command 10 | { 11 | get 12 | { 13 | return new DelegateCommand((obj) => { 14 | MessageBox.Show("Test"); 15 | }); 16 | } 17 | } 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/ViewModels/PageAboutViewModel.cs: -------------------------------------------------------------------------------- 1 | using DMSkin.Core.MVVM; 2 | using System.Diagnostics; 3 | using System.Windows.Input; 4 | 5 | namespace DMSkin.WPF.Demos.ViewModels 6 | { 7 | public class PageAboutViewModel 8 | { 9 | public ICommand OpenLinkCommand 10 | { 11 | get 12 | { 13 | return new DelegateCommand(obj => 14 | { 15 | if (obj is string url) 16 | { 17 | Process.Start(url); 18 | } 19 | }); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/ViewModels/StartWindowViewModel.cs: -------------------------------------------------------------------------------- 1 | using DMSkin.Core.Common; 2 | using DMSkin.Core.MVVM; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Diagnostics; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Input; 9 | using System.Windows.Media; 10 | 11 | namespace DMSkin.WPF.Demos.ViewModels 12 | { 13 | public class StartWindowViewModel:ViewModelBase 14 | { 15 | public ICommand ComplexWindowCommand 16 | { 17 | get 18 | { 19 | return new DelegateCommand(obj => 20 | { 21 | //UI线程执行 22 | Execute.OnUIThread(() => 23 | { 24 | new ComplexWindow().Show(); 25 | }); 26 | }); 27 | } 28 | } 29 | 30 | public ICommand SimpleWindowCommand 31 | { 32 | get 33 | { 34 | return new DelegateCommand(obj => 35 | { 36 | new SimpleWindow().Show(); 37 | }); 38 | } 39 | } 40 | 41 | 42 | 43 | private Color _DMWindowShadowColor; 44 | 45 | /// 46 | /// 窗体阴影颜色 47 | /// 48 | public Color DMWindowShadowColor 49 | { 50 | get { return _DMWindowShadowColor; } 51 | set 52 | { 53 | _DMWindowShadowColor = value; 54 | OnPropertyChanged("DMWindowShadowColor"); 55 | } 56 | } 57 | 58 | public ICommand ChangeWindowCommand 59 | { 60 | get 61 | { 62 | return new DelegateCommand(obj => 63 | { 64 | DMWindowShadowColor = (Color)ColorConverter.ConvertFromString(obj.ToString()); 65 | }); 66 | } 67 | } 68 | 69 | 70 | 71 | public ICommand OpenLinkCommand 72 | { 73 | get 74 | { 75 | return new DelegateCommand(obj => 76 | { 77 | if (obj is string url) 78 | { 79 | Process.Start(url); 80 | } 81 | }); 82 | } 83 | } 84 | 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/Views/PageAbout.xaml: -------------------------------------------------------------------------------- 1 |  14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 41 | 48 | 59 | 70 | 76 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/Views/PageAbout.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Windows.Data; 8 | using System.Windows.Documents; 9 | using System.Windows.Input; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Imaging; 12 | using System.Windows.Navigation; 13 | using System.Windows.Shapes; 14 | 15 | namespace DMSkin.WPF.Demos.Views 16 | { 17 | /// 18 | /// PageAbout.xaml 的交互逻辑 19 | /// 20 | public partial class PageAbout : Page 21 | { 22 | public PageAbout() 23 | { 24 | InitializeComponent(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/Views/PageAnimation.xaml: -------------------------------------------------------------------------------- 1 |  13 | 14 | 15 | 16 | 17 | 25 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/Views/PageAnimation.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Windows.Data; 8 | using System.Windows.Documents; 9 | using System.Windows.Input; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Imaging; 12 | using System.Windows.Navigation; 13 | using System.Windows.Shapes; 14 | 15 | namespace DMSkin.WPF.Demos.Views 16 | { 17 | /// 18 | /// PageAnimation.xaml 的交互逻辑 19 | /// 20 | public partial class PageAnimation : Page 21 | { 22 | public PageAnimation() 23 | { 24 | InitializeComponent(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /DMSkin.WPF.Demos/Views/PageAntDesign.xaml: -------------------------------------------------------------------------------- 1 |  12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 52 | 53 | 54 | 55 | 56 | 61 | 62 | 63 | 64 | 65 |