├── .gitattributes
├── .gitignore
├── Mica.sln
├── Mica
├── App.xaml
├── App.xaml.cs
├── Assets
│ ├── LargeTile.scale-100.png
│ ├── LargeTile.scale-125.png
│ ├── LargeTile.scale-150.png
│ ├── LargeTile.scale-200.png
│ ├── LockScreenLogo.scale-200.png
│ ├── SmallTile.scale-100.png
│ ├── SmallTile.scale-125.png
│ ├── SmallTile.scale-150.png
│ ├── SmallTile.scale-200.png
│ ├── SmallTile.scale-400.png
│ ├── SplashScreen.scale-100.png
│ ├── SplashScreen.scale-125.png
│ ├── SplashScreen.scale-150.png
│ ├── SplashScreen.scale-200.png
│ ├── SplashScreen.scale-400.png
│ ├── Square150x150Logo.scale-100.png
│ ├── Square150x150Logo.scale-125.png
│ ├── Square150x150Logo.scale-150.png
│ ├── Square150x150Logo.scale-200.png
│ ├── Square150x150Logo.scale-400.png
│ ├── Square44x44Logo.altform-lightunplated_targetsize-16.png
│ ├── Square44x44Logo.altform-lightunplated_targetsize-24.png
│ ├── Square44x44Logo.altform-lightunplated_targetsize-256.png
│ ├── Square44x44Logo.altform-lightunplated_targetsize-32.png
│ ├── Square44x44Logo.altform-lightunplated_targetsize-48.png
│ ├── Square44x44Logo.altform-unplated_targetsize-16.png
│ ├── Square44x44Logo.altform-unplated_targetsize-256.png
│ ├── Square44x44Logo.altform-unplated_targetsize-32.png
│ ├── Square44x44Logo.altform-unplated_targetsize-48.png
│ ├── Square44x44Logo.scale-100.png
│ ├── Square44x44Logo.scale-125.png
│ ├── Square44x44Logo.scale-150.png
│ ├── Square44x44Logo.scale-200.png
│ ├── Square44x44Logo.scale-400.png
│ ├── Square44x44Logo.targetsize-16.png
│ ├── Square44x44Logo.targetsize-24.png
│ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ ├── Square44x44Logo.targetsize-256.png
│ ├── Square44x44Logo.targetsize-32.png
│ ├── Square44x44Logo.targetsize-48.png
│ ├── StoreLogo.backup.png
│ ├── StoreLogo.scale-100.png
│ ├── StoreLogo.scale-125.png
│ ├── StoreLogo.scale-150.png
│ ├── StoreLogo.scale-200.png
│ ├── StoreLogo.scale-400.png
│ ├── Wide310x150Logo.scale-100.png
│ ├── Wide310x150Logo.scale-125.png
│ ├── Wide310x150Logo.scale-150.png
│ ├── Wide310x150Logo.scale-200.png
│ └── Wide310x150Logo.scale-400.png
├── Brushes
│ ├── BackdropKind.cs
│ └── MicaAltBrush.cs
├── Helpers
│ └── ColorHelper.cs
├── LICENSE
├── MainPage.xaml
├── MainPage.xaml.cs
├── Materials
│ ├── AuroraLite.xaml
│ ├── AuroraLite.xaml.cs
│ ├── Bloom.html
│ ├── BloomView.xaml
│ ├── BloomView.xaml.cs
│ ├── RedBloom.html
│ ├── RedBloomView.xaml
│ └── RedBloomView.xaml.cs
├── Mica.csproj
├── Package.appxmanifest
├── Properties
│ ├── AssemblyInfo.cs
│ └── Default.rd.xml
└── SettingsControls
│ ├── Converters.cs
│ ├── SettingsBlockControl.xaml
│ ├── SettingsBlockControl.xaml.cs
│ ├── SettingsDisplayControl.xaml
│ └── SettingsDisplayControl.xaml.cs
└── TenMica
├── DwmThumbnail.h
├── TenMica.vcxproj
├── TenMica.vcxproj.filters
├── TenMicaBrush.cpp
├── TenMicaBrush.h
├── packages.config
├── pch.cpp
└── pch.h
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.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 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Oo]ut/
33 | [Ll]og/
34 | [Ll]ogs/
35 |
36 | # Visual Studio 2015/2017 cache/options directory
37 | .vs/
38 | # Uncomment if you have tasks that create the project's static files in wwwroot
39 | #wwwroot/
40 |
41 | # Visual Studio 2017 auto generated files
42 | Generated\ Files/
43 |
44 | # MSTest test Results
45 | [Tt]est[Rr]esult*/
46 | [Bb]uild[Ll]og.*
47 |
48 | # NUnit
49 | *.VisualState.xml
50 | TestResult.xml
51 | nunit-*.xml
52 |
53 | # Build Results of an ATL Project
54 | [Dd]ebugPS/
55 | [Rr]eleasePS/
56 | dlldata.c
57 |
58 | # Benchmark Results
59 | BenchmarkDotNet.Artifacts/
60 |
61 | # .NET Core
62 | project.lock.json
63 | project.fragment.lock.json
64 | artifacts/
65 |
66 | # ASP.NET Scaffolding
67 | ScaffoldingReadMe.txt
68 |
69 | # StyleCop
70 | StyleCopReport.xml
71 |
72 | # Files built by Visual Studio
73 | *_i.c
74 | *_p.c
75 | *_h.h
76 | *.ilk
77 | *.meta
78 | *.obj
79 | *.iobj
80 | *.pch
81 | *.pdb
82 | *.ipdb
83 | *.pgc
84 | *.pgd
85 | *.rsp
86 | *.sbr
87 | *.tlb
88 | *.tli
89 | *.tlh
90 | *.tmp
91 | *.tmp_proj
92 | *_wpftmp.csproj
93 | *.log
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio LightSwitch build output
298 | **/*.HTMLClient/GeneratedArtifacts
299 | **/*.DesktopClient/GeneratedArtifacts
300 | **/*.DesktopClient/ModelManifest.xml
301 | **/*.Server/GeneratedArtifacts
302 | **/*.Server/ModelManifest.xml
303 | _Pvt_Extensions
304 |
305 | # Paket dependency manager
306 | .paket/paket.exe
307 | paket-files/
308 |
309 | # FAKE - F# Make
310 | .fake/
311 |
312 | # CodeRush personal settings
313 | .cr/personal
314 |
315 | # Python Tools for Visual Studio (PTVS)
316 | __pycache__/
317 | *.pyc
318 |
319 | # Cake - Uncomment if you are using it
320 | # tools/**
321 | # !tools/packages.config
322 |
323 | # Tabs Studio
324 | *.tss
325 |
326 | # Telerik's JustMock configuration file
327 | *.jmconfig
328 |
329 | # BizTalk build output
330 | *.btp.cs
331 | *.btm.cs
332 | *.odx.cs
333 | *.xsd.cs
334 |
335 | # OpenCover UI analysis results
336 | OpenCover/
337 |
338 | # Azure Stream Analytics local run output
339 | ASALocalRun/
340 |
341 | # MSBuild Binary and Structured Log
342 | *.binlog
343 |
344 | # NVidia Nsight GPU debugger configuration file
345 | *.nvuser
346 |
347 | # MFractors (Xamarin productivity tool) working folder
348 | .mfractor/
349 |
350 | # Local History for Visual Studio
351 | .localhistory/
352 |
353 | # BeatPulse healthcheck temp database
354 | healthchecksdb
355 |
356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
357 | MigrationBackup/
358 |
359 | # Ionide (cross platform F# VS Code tools) working folder
360 | .ionide/
361 |
362 | # Fody - auto-generated XML schema
363 | FodyWeavers.xsd
--------------------------------------------------------------------------------
/Mica.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.4.33205.214
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mica", "Mica\Mica.csproj", "{C54D8977-3DA3-4273-AF12-51B3AC5F6F35}"
7 | EndProject
8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TenMica", "TenMica\TenMica.vcxproj", "{9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|ARM = Debug|ARM
13 | Debug|ARM64 = Debug|ARM64
14 | Debug|x64 = Debug|x64
15 | Debug|x86 = Debug|x86
16 | Release|ARM = Release|ARM
17 | Release|ARM64 = Release|ARM64
18 | Release|x64 = Release|x64
19 | Release|x86 = Release|x86
20 | EndGlobalSection
21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
22 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Debug|ARM.ActiveCfg = Debug|ARM
23 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Debug|ARM.Build.0 = Debug|ARM
24 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Debug|ARM.Deploy.0 = Debug|ARM
25 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Debug|ARM64.ActiveCfg = Debug|ARM64
26 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Debug|ARM64.Build.0 = Debug|ARM64
27 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Debug|ARM64.Deploy.0 = Debug|ARM64
28 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Debug|x64.ActiveCfg = Debug|x64
29 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Debug|x64.Build.0 = Debug|x64
30 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Debug|x64.Deploy.0 = Debug|x64
31 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Debug|x86.ActiveCfg = Debug|x86
32 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Debug|x86.Build.0 = Debug|x86
33 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Debug|x86.Deploy.0 = Debug|x86
34 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Release|ARM.ActiveCfg = Release|ARM
35 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Release|ARM.Build.0 = Release|ARM
36 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Release|ARM.Deploy.0 = Release|ARM
37 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Release|ARM64.ActiveCfg = Release|ARM64
38 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Release|ARM64.Build.0 = Release|ARM64
39 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Release|ARM64.Deploy.0 = Release|ARM64
40 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Release|x64.ActiveCfg = Release|x64
41 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Release|x64.Build.0 = Release|x64
42 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Release|x64.Deploy.0 = Release|x64
43 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Release|x86.ActiveCfg = Release|x86
44 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Release|x86.Build.0 = Release|x86
45 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}.Release|x86.Deploy.0 = Release|x86
46 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Debug|ARM.ActiveCfg = Debug|ARM
47 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Debug|ARM.Build.0 = Debug|ARM
48 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Debug|ARM64.ActiveCfg = Debug|ARM64
49 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Debug|ARM64.Build.0 = Debug|ARM64
50 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Debug|x64.ActiveCfg = Debug|x64
51 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Debug|x64.Build.0 = Debug|x64
52 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Debug|x86.ActiveCfg = Debug|Win32
53 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Debug|x86.Build.0 = Debug|Win32
54 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Release|ARM.ActiveCfg = Release|ARM
55 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Release|ARM.Build.0 = Release|ARM
56 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Release|ARM64.ActiveCfg = Release|ARM64
57 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Release|ARM64.Build.0 = Release|ARM64
58 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Release|x64.ActiveCfg = Release|x64
59 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Release|x64.Build.0 = Release|x64
60 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Release|x86.ActiveCfg = Release|Win32
61 | {9BCE64F0-F93A-4EA1-BC2F-7E6D2667AEBA}.Release|x86.Build.0 = Release|Win32
62 | EndGlobalSection
63 | GlobalSection(SolutionProperties) = preSolution
64 | HideSolutionNode = FALSE
65 | EndGlobalSection
66 | GlobalSection(ExtensibilityGlobals) = postSolution
67 | SolutionGuid = {A33CCA4C-A367-480F-BAE3-27906C364A8D}
68 | EndGlobalSection
69 | EndGlobal
70 |
--------------------------------------------------------------------------------
/Mica/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.ExceptionServices;
6 | using System.Runtime.InteropServices.WindowsRuntime;
7 | using System.Threading.Tasks;
8 | using Windows.ApplicationModel;
9 | using Windows.ApplicationModel.Activation;
10 | using Windows.Foundation;
11 | using Windows.Foundation.Collections;
12 | using Windows.Foundation.Metadata;
13 | using Windows.UI.ViewManagement;
14 | using Windows.UI.WindowManagement;
15 | using Windows.UI.Xaml;
16 | using Windows.UI.Xaml.Controls;
17 | using Windows.UI.Xaml.Controls.Primitives;
18 | using Windows.UI.Xaml.Data;
19 | using Windows.UI.Xaml.Hosting;
20 | using Windows.UI.Xaml.Input;
21 | using Windows.UI.Xaml.Media;
22 | using Windows.UI.Xaml.Navigation;
23 |
24 | namespace Mica
25 | {
26 | ///
27 | /// Provides application-specific behavior to supplement the default Application class.
28 | ///
29 | sealed partial class App : Application
30 | {
31 | ///
32 | /// Initializes the singleton application object. This is the first line of authored code
33 | /// executed, and as such is the logical equivalent of main() or WinMain().
34 | ///
35 | public App()
36 | {
37 | this.InitializeComponent();
38 | this.Suspending += OnSuspending;
39 | UnhandledException += OnUnhandledException;
40 |
41 | TaskScheduler.UnobservedTaskException += OnUnobservedException;
42 | AppDomain.CurrentDomain.FirstChanceException += CurrentDomain_FirstChanceException;
43 | }
44 | private static void OnUnobservedException(object sender, UnobservedTaskExceptionEventArgs e)
45 | {
46 | // Occurs when an exception is not handled on a background thread.
47 | // ie. A task is fired and forgotten Task.Run(() => {...})
48 |
49 |
50 | // suppress and handle it manually.
51 | e.SetObserved();
52 | }
53 |
54 | private static void OnUnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
55 | {
56 | e.Handled = true;
57 | }
58 |
59 | private void CurrentDomain_FirstChanceException(object sender, FirstChanceExceptionEventArgs e)
60 | {
61 |
62 | }
63 | ///
64 | /// Invoked when the application is launched normally by the end user. Other entry points
65 | /// will be used such as when the application is launched to open a specific file.
66 | ///
67 | /// Details about the launch request and process.
68 | protected override void OnLaunched(LaunchActivatedEventArgs e)
69 | {
70 | // StartApp();
71 | Frame rootFrame = Window.Current.Content as Frame;
72 |
73 | // Do not repeat app initialization when the Window already has content,
74 | // just ensure that the window is active
75 | if (rootFrame == null)
76 | {
77 | // Create a Frame to act as the navigation context and navigate to the first page
78 | rootFrame = new Frame();
79 |
80 | rootFrame.NavigationFailed += OnNavigationFailed;
81 |
82 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
83 | {
84 | //TODO: Load state from previously suspended application
85 | }
86 |
87 | // Place the frame in the current Window
88 | Window.Current.Content = rootFrame;
89 | }
90 |
91 | if (e.PrelaunchActivated == false)
92 | {
93 | if (rootFrame.Content == null)
94 | {
95 | // When the navigation stack isn't restored navigate to the first page,
96 | // configuring the new page by passing required information as a navigation
97 | // parameter
98 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
99 | }
100 | // Ensure the current window is active
101 | Window.Current.Activate();
102 | }
103 | }
104 |
105 | protected override void OnActivated(IActivatedEventArgs args)
106 | {
107 | if (args.Kind == ActivationKind.Protocol)
108 | {
109 | ProtocolActivatedEventArgs eventArgs = args as ProtocolActivatedEventArgs;
110 | // TODO: Handle URI activation
111 | // The received URI is eventArgs.Uri.AbsoluteUri
112 | Frame rootFrame = Window.Current.Content as Frame;
113 |
114 | // Do not repeat app initialization when the Window already has content,
115 | // just ensure that the window is active
116 | if (rootFrame == null)
117 | {
118 | // Create a Frame to act as the navigation context and navigate to the first page
119 | rootFrame = new Frame();
120 |
121 | rootFrame.NavigationFailed += OnNavigationFailed;
122 |
123 | // Place the frame in the current Window
124 | Window.Current.Content = rootFrame;
125 | }
126 | if (rootFrame.Content == null)
127 | {
128 | // When the navigation stack isn't restored navigate to the first page,
129 | // configuring the new page by passing required information as a navigation
130 | // parameter
131 | rootFrame.Navigate(typeof(MainPage));
132 | }
133 | // Ensure the current window is active
134 | Window.Current.Activate();
135 | }
136 | }
137 |
138 | ///
139 | /// Invoked when Navigation to a certain page fails
140 | ///
141 | /// The Frame which failed navigation
142 | /// Details about the navigation failure
143 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
144 | {
145 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
146 | }
147 |
148 | ///
149 | /// Invoked when application execution is being suspended. Application state is saved
150 | /// without knowing whether the application will be terminated or resumed with the contents
151 | /// of memory still intact.
152 | ///
153 | /// The source of the suspend request.
154 | /// Details about the suspend request.
155 | private void OnSuspending(object sender, SuspendingEventArgs e)
156 | {
157 | var deferral = e.SuspendingOperation.GetDeferral();
158 | //TODO: Save application state and stop any background activity
159 | deferral.Complete();
160 | }
161 | }
162 | }
163 |
--------------------------------------------------------------------------------
/Mica/Assets/LargeTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/LargeTile.scale-100.png
--------------------------------------------------------------------------------
/Mica/Assets/LargeTile.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/LargeTile.scale-125.png
--------------------------------------------------------------------------------
/Mica/Assets/LargeTile.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/LargeTile.scale-150.png
--------------------------------------------------------------------------------
/Mica/Assets/LargeTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/LargeTile.scale-200.png
--------------------------------------------------------------------------------
/Mica/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/Mica/Assets/SmallTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/SmallTile.scale-100.png
--------------------------------------------------------------------------------
/Mica/Assets/SmallTile.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/SmallTile.scale-125.png
--------------------------------------------------------------------------------
/Mica/Assets/SmallTile.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/SmallTile.scale-150.png
--------------------------------------------------------------------------------
/Mica/Assets/SmallTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/SmallTile.scale-200.png
--------------------------------------------------------------------------------
/Mica/Assets/SmallTile.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/SmallTile.scale-400.png
--------------------------------------------------------------------------------
/Mica/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/Mica/Assets/SplashScreen.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/SplashScreen.scale-125.png
--------------------------------------------------------------------------------
/Mica/Assets/SplashScreen.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/SplashScreen.scale-150.png
--------------------------------------------------------------------------------
/Mica/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/Mica/Assets/SplashScreen.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/SplashScreen.scale-400.png
--------------------------------------------------------------------------------
/Mica/Assets/Square150x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square150x150Logo.scale-100.png
--------------------------------------------------------------------------------
/Mica/Assets/Square150x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square150x150Logo.scale-125.png
--------------------------------------------------------------------------------
/Mica/Assets/Square150x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square150x150Logo.scale-150.png
--------------------------------------------------------------------------------
/Mica/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/Mica/Assets/Square150x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square150x150Logo.scale-400.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.altform-unplated_targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.altform-unplated_targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.altform-unplated_targetsize-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.altform-unplated_targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.scale-100.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.scale-125.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.scale-150.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.scale-400.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.targetsize-16.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.targetsize-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.targetsize-24.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.targetsize-256.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.targetsize-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.targetsize-32.png
--------------------------------------------------------------------------------
/Mica/Assets/Square44x44Logo.targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Square44x44Logo.targetsize-48.png
--------------------------------------------------------------------------------
/Mica/Assets/StoreLogo.backup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/StoreLogo.backup.png
--------------------------------------------------------------------------------
/Mica/Assets/StoreLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/StoreLogo.scale-100.png
--------------------------------------------------------------------------------
/Mica/Assets/StoreLogo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/StoreLogo.scale-125.png
--------------------------------------------------------------------------------
/Mica/Assets/StoreLogo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/StoreLogo.scale-150.png
--------------------------------------------------------------------------------
/Mica/Assets/StoreLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/StoreLogo.scale-200.png
--------------------------------------------------------------------------------
/Mica/Assets/StoreLogo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/StoreLogo.scale-400.png
--------------------------------------------------------------------------------
/Mica/Assets/Wide310x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Wide310x150Logo.scale-100.png
--------------------------------------------------------------------------------
/Mica/Assets/Wide310x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Wide310x150Logo.scale-125.png
--------------------------------------------------------------------------------
/Mica/Assets/Wide310x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Wide310x150Logo.scale-150.png
--------------------------------------------------------------------------------
/Mica/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/Mica/Assets/Wide310x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FireCubeStudios/Mica-App/6d23981d48006a828450861ea11bfe26d2b6a58d/Mica/Assets/Wide310x150Logo.scale-400.png
--------------------------------------------------------------------------------
/Mica/Brushes/BackdropKind.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Mica.Brushes
8 | {
9 | public enum BackdropKind
10 | {
11 | Base = 0,
12 | BaseAlt = 1,
13 | Custom = 2
14 | }
15 | }
--------------------------------------------------------------------------------
/Mica/Brushes/MicaAltBrush.cs:
--------------------------------------------------------------------------------
1 | using CommunityToolkit.Mvvm.ComponentModel;
2 | using Microsoft.Graphics.Canvas.Effects;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Runtime.CompilerServices;
7 | using Windows.ApplicationModel;
8 | using Windows.UI;
9 | using Windows.UI.Composition;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Media;
12 |
13 | namespace Mica.Brushes
14 | {
15 | public class MicaAltBrush : XamlCompositionBrushBase, INotifyPropertyChanged
16 | {
17 | private double tintOpacity;
18 |
19 | public double TintOpacity
20 | {
21 | get => tintOpacity;
22 | set => tintOpacity = value;
23 | }
24 |
25 | private double luminosityOpacity;
26 |
27 | public double LuminosityOpacity
28 | {
29 | get => luminosityOpacity;
30 | set => luminosityOpacity = value;
31 | }
32 |
33 | private Color tintColor;
34 |
35 | public Color TintColor
36 | {
37 | get => tintColor;
38 | set => tintColor = value;
39 | }
40 |
41 | private Color luminosityColor;
42 |
43 | public Color LuminosityColor
44 | {
45 | get => luminosityColor;
46 | set => luminosityColor = value;
47 | }
48 |
49 | private ElementTheme _theme;
50 |
51 | public ElementTheme Theme
52 | {
53 | get => _theme;
54 | set
55 | {
56 | _theme = value;
57 | UpdateTheme();
58 | }
59 | }
60 |
61 | private BackdropKind _kind;
62 |
63 | public int Kind
64 | {
65 | get => (int)_kind;
66 | set
67 | {
68 | _kind = (BackdropKind)value;
69 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsKindCustom)));
70 | UpdateTheme();
71 | }
72 | }
73 |
74 | public bool IsKindCustom => _kind == BackdropKind.Custom;
75 |
76 | private void UpdateTheme()
77 | {
78 | switch (_kind)
79 | {
80 | case BackdropKind.Custom:
81 | return;
82 | case BackdropKind.Base:
83 | switch (Theme)
84 | {
85 | case ElementTheme.Light:
86 | tintColor = luminosityColor = Color.FromArgb(255, 243, 243, 243);
87 | tintOpacity = 50;
88 | luminosityOpacity = 100;
89 | break;
90 | case ElementTheme.Dark:
91 | tintColor = luminosityColor = Color.FromArgb(255, 32, 32, 32);
92 | tintOpacity = 80;
93 | luminosityOpacity = 100;
94 | break;
95 | }
96 | break;
97 | case BackdropKind.BaseAlt:
98 | switch (Theme)
99 | {
100 | case ElementTheme.Light:
101 | tintColor = luminosityColor = Color.FromArgb(255, 218, 218, 218);
102 | tintOpacity = 50;
103 | luminosityOpacity = 100;
104 | break;
105 | case ElementTheme.Dark:
106 | tintColor = luminosityColor = Color.FromArgb(255, 10, 10, 10);
107 | tintOpacity = 0;
108 | luminosityOpacity = 100;
109 | break;
110 | }
111 | break;
112 | }
113 |
114 | UpdateBrush();
115 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(TintColor)));
116 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(TintOpacity)));
117 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(LuminosityColor)));
118 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(LuminosityOpacity)));
119 | }
120 |
121 | public event PropertyChangedEventHandler PropertyChanged;
122 | private void NotifyPropertyChanged([CallerMemberName] String propertyName = "") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
123 |
124 | public static CompositionBrush BuildMicaEffectBrush(Compositor compositor, Color tintColor, float tintOpacity, Color luminosityColor, float luminosityOpacity)
125 | {
126 | // Tint Color.
127 |
128 | var tintColorEffect = new ColorSourceEffect();
129 | tintColorEffect.Name = "TintColor";
130 | tintColorEffect.Color = tintColor;
131 |
132 | // OpacityEffect applied to Tint.
133 | var tintOpacityEffect = new OpacityEffect();
134 | tintOpacityEffect.Name = "TintOpacity";
135 | tintOpacityEffect.Opacity = tintOpacity;
136 | tintOpacityEffect.Source = tintColorEffect;
137 |
138 | // Apply Luminosity:
139 |
140 | // Luminosity Color.
141 | var luminosityColorEffect = new ColorSourceEffect();
142 | luminosityColorEffect.Color = luminosityColor;
143 |
144 | // OpacityEffect applied to Luminosity.
145 | var luminosityOpacityEffect = new OpacityEffect();
146 | luminosityOpacityEffect.Name = "LuminosityOpacity";
147 | luminosityOpacityEffect.Opacity = luminosityOpacity;
148 | luminosityOpacityEffect.Source = luminosityColorEffect;
149 |
150 | // Luminosity Blend.
151 | // NOTE: There is currently a bug where the names of BlendEffectMode::Luminosity and BlendEffectMode::Color are flipped.
152 | var luminosityBlendEffect = new BlendEffect();
153 | luminosityBlendEffect.Mode = BlendEffectMode.Color;
154 | luminosityBlendEffect.Background = new CompositionEffectSourceParameter("BlurredWallpaperBackdrop");
155 | luminosityBlendEffect.Foreground = luminosityOpacityEffect;
156 |
157 | // Apply Tint:
158 |
159 | // Color Blend.
160 | // NOTE: There is currently a bug where the names of BlendEffectMode::Luminosity and BlendEffectMode::Color are flipped.
161 | var colorBlendEffect = new BlendEffect();
162 | colorBlendEffect.Mode = BlendEffectMode.Luminosity;
163 | colorBlendEffect.Background = luminosityBlendEffect;
164 | colorBlendEffect.Foreground = tintOpacityEffect;
165 |
166 | CompositionEffectBrush micaEffectBrush = compositor.CreateEffectFactory(colorBlendEffect).CreateBrush();
167 | //var blurredWallpaperBackdropBrush = (ICompositorWithBlurredWallpaperBackdropBrush)((object)compositor); // Code for < 22000 SDK
168 | //micaEffectBrush.SetSourceParameter("BlurredWallpaperBackdrop", blurredWallpaperBackdropBrush.TryCreateBlurredWallpaperBackdropBrush());
169 | micaEffectBrush.SetSourceParameter("BlurredWallpaperBackdrop", compositor.TryCreateBlurredWallpaperBackdropBrush());
170 |
171 | return micaEffectBrush;
172 | }
173 |
174 | private CompositionBrush CreateCrossFadeEffectBrush(Compositor compositor, CompositionBrush from, CompositionBrush to)
175 | {
176 | var crossFadeEffect = new CrossFadeEffect();
177 | crossFadeEffect.Name = "Crossfade"; // Name to reference when starting the animation.
178 | crossFadeEffect.Source1 = new CompositionEffectSourceParameter("source1");
179 | crossFadeEffect.Source2 = new CompositionEffectSourceParameter("source2");
180 | crossFadeEffect.CrossFade = 0;
181 |
182 | CompositionEffectBrush crossFadeEffectBrush = compositor.CreateEffectFactory(crossFadeEffect, new List() { "Crossfade.CrossFade" }).CreateBrush();
183 | crossFadeEffectBrush.Comment = "Crossfade";
184 | // The inputs have to be swapped here to work correctly...
185 | crossFadeEffectBrush.SetSourceParameter("source1", to);
186 | crossFadeEffectBrush.SetSourceParameter("source2", from);
187 | return crossFadeEffectBrush;
188 | }
189 |
190 | private ScalarKeyFrameAnimation CreateCrossFadeAnimation(Compositor compositor)
191 | {
192 | ScalarKeyFrameAnimation animation = compositor.CreateScalarKeyFrameAnimation();
193 | LinearEasingFunction linearEasing = compositor.CreateLinearEasingFunction();
194 | animation.InsertKeyFrame(0.0f, 0.0f, linearEasing);
195 | animation.InsertKeyFrame(1.0f, 1.0f, linearEasing);
196 | animation.Duration = TimeSpan.FromMilliseconds(250);
197 | return animation;
198 | }
199 |
200 | private void UpdateBrush()
201 | {
202 | Compositor compositor = Window.Current.Compositor;
203 |
204 | CompositionBrush newBrush = BuildMicaEffectBrush(compositor, TintColor, (float)(TintOpacity / 100), LuminosityColor, (float)(LuminosityOpacity / 100));
205 |
206 | CompositionBrush oldBrush = CompositionBrush;
207 |
208 | if (oldBrush == null || CompositionBrush.Comment == "Crossfade" || Kind == (int)BackdropKind.Custom)
209 | {
210 | // Set new brush directly
211 | if (oldBrush != null)
212 | {
213 | oldBrush.Dispose();
214 | }
215 | this.CompositionBrush = newBrush;
216 | }
217 | else
218 | {
219 | // Crossfade
220 | CompositionBrush crossFadeBrush = CreateCrossFadeEffectBrush(compositor, oldBrush, newBrush);
221 | ScalarKeyFrameAnimation animation = CreateCrossFadeAnimation(compositor);
222 | CompositionBrush = crossFadeBrush;
223 |
224 | var crossFadeAnimationBatch = compositor.CreateScopedBatch(CompositionBatchTypes.Animation);
225 | crossFadeBrush.StartAnimation("CrossFade.CrossFade", animation);
226 | crossFadeAnimationBatch.End();
227 |
228 | crossFadeAnimationBatch.Completed += (o, a) =>
229 | {
230 | crossFadeBrush.Dispose();
231 | oldBrush.Dispose();
232 | this.CompositionBrush = newBrush;
233 | };
234 | }
235 | }
236 |
237 | protected override void OnConnected()
238 | {
239 | if (DesignMode.DesignModeEnabled)
240 | {
241 | CompositionBrush = Window.Current.Compositor.CreateColorBrush(Color.FromArgb(255, 243, 243, 243));
242 | return;
243 | }
244 |
245 | UpdateBrush();
246 | }
247 | }
248 | }
--------------------------------------------------------------------------------
/Mica/Helpers/ColorHelper.cs:
--------------------------------------------------------------------------------
1 | using Windows.UI;
2 |
3 | namespace Mica.Helpers
4 | {
5 | class ColorHelper
6 | {
7 | private static
8 | (
9 | Color SystemAccentColorLight3,
10 | Color SystemAccentColorLight2,
11 | Color SystemAccentColorLight1,
12 | Color SystemAccentColor,
13 | Color SystemAccentColorDark1,
14 | Color SystemAccentColorDark2,
15 | Color SystemAccentColorDark3
16 | )
17 | GetColorPalette(Color c)
18 | {
19 | return
20 | (
21 | ChangeColorBrightness(c, 0.51f),
22 | ChangeColorBrightness(c, 0.25f),
23 | ChangeColorBrightness(c, 0.02f),
24 | c,
25 | ChangeColorBrightness(c, -0.19f),
26 | ChangeColorBrightness(c, -0.40f),
27 | ChangeColorBrightness(c, -0.68f)
28 | );
29 | }
30 | public static Color ChangeColorBrightness(Color color, double correctionFactor)
31 | {
32 | double red = color.R;
33 | double green = color.G;
34 | double blue = color.B;
35 |
36 | if (correctionFactor < 0)
37 | {
38 | correctionFactor = 1 + correctionFactor;
39 | red *= correctionFactor;
40 | green *= correctionFactor;
41 | blue *= correctionFactor;
42 | }
43 | else
44 | {
45 | red = (255 - red) * correctionFactor + red;
46 | green = (255 - green) * correctionFactor + green;
47 | blue = (255 - blue) * correctionFactor + blue;
48 | }
49 |
50 | return Color.FromArgb(color.A, (byte)red, (byte)green, (byte)blue);
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Mica/LICENSE:
--------------------------------------------------------------------------------
1 | This is free and unencumbered software released into the public domain.
2 |
3 | Anyone is free to copy, modify, publish, use, compile, sell, or
4 | distribute this software, either in source code form or as a compiled
5 | binary, for any purpose, commercial or non-commercial, and by any
6 | means.
7 |
8 | In jurisdictions that recognize copyright laws, the author or authors
9 | of this software dedicate any and all copyright interest in the
10 | software to the public domain. We make this dedication for the benefit
11 | of the public at large and to the detriment of our heirs and
12 | successors. We intend this dedication to be an overt act of
13 | relinquishment in perpetuity of all present and future rights to this
14 | software under copyright law.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | For more information, please refer to
25 |
--------------------------------------------------------------------------------
/Mica/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
23 |
32 |
33 |
34 |
35 |
36 |
37 | Mica™️
38 | Mica personalization
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
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 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | Effects personalization
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | About this app
117 | Mica™️ 2.0.x.0
118 | Developed by FireCubeStudios
119 | Icon by josephbeattiee
120 | 10Mica by Ahmed Walid
121 | Follow me on Twitter
122 | Join FireCubeStudios server
123 | GitHub repository
124 |
125 | Get Acrylic™️
126 | Get Tabbed™️
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
--------------------------------------------------------------------------------
/Mica/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Toolkit.Uwp.Helpers;
2 | using System;
3 | using Windows.ApplicationModel.Core;
4 | using Windows.System;
5 | using Windows.UI;
6 | using Windows.UI.ViewManagement;
7 | using Windows.UI.Xaml;
8 | using Windows.UI.Xaml.Controls;
9 | using Windows.UI.Xaml.Input;
10 |
11 | namespace Mica
12 | {
13 | public sealed partial class MainPage : Page
14 | {
15 | public MainPage()
16 | {
17 | this.InitializeComponent();
18 | ApplicationViewTitleBar titleBar = ApplicationView.GetForCurrentView().TitleBar;
19 | titleBar.ButtonBackgroundColor = Colors.Transparent;
20 | titleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
21 | CoreApplicationViewTitleBar coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
22 | coreTitleBar.ExtendViewIntoTitleBar = true;
23 | Window.Current.SetTitleBar(AppTitleBar);
24 | Tip.IsOpen = SystemInformation.Instance.IsFirstRun ? true : false;
25 | InfiniteMicaSetting.Visibility = IsWin11() ? Visibility.Visible : Visibility.Collapsed;
26 | }
27 |
28 | private void ThemeSwitch_Toggled(object sender, RoutedEventArgs e)
29 | {
30 | if (Window.Current.Content is FrameworkElement frameworkElement)
31 | {
32 | frameworkElement.RequestedTheme = ThemeSwitch.IsOn ? ElementTheme.Dark : ElementTheme.Light;
33 | if(Mica10 is not null)
34 | Mica10.ForcedTheme = ThemeSwitch.IsOn ? ApplicationTheme.Dark : ApplicationTheme.Light;
35 | }
36 | }
37 |
38 | private void Page_SizeChanged(object sender, SizeChangedEventArgs e)
39 | {
40 | if (Window.Current.Bounds.Width < 800)
41 | {
42 | AboutPanel.Visibility = Visibility.Collapsed;
43 | CloseButton.Margin = new Thickness(50, 54, 50, 100);
44 | SettingsGrid.Margin = new Thickness(50, 50, 50, 100);
45 | }
46 | else
47 | {
48 | AboutPanel.Visibility = Visibility.Visible;
49 | CloseButton.Margin = new Thickness(100, 54, 300, 100);
50 | SettingsGrid.Margin = new Thickness(100, 50, 300, 100);
51 | }
52 | }
53 |
54 | private void Button_Click(object sender, RoutedEventArgs e) => Tip.IsOpen = true;
55 |
56 | private void Grid_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e) => SettingsPanel.Visibility = Visibility.Visible;
57 |
58 | private void Grid_RightTapped(object sender, RightTappedRoutedEventArgs e) => SettingsPanel.Visibility = Visibility.Visible;
59 |
60 | private void CloseButton_Click(object sender, RoutedEventArgs e) => SettingsPanel.Visibility = Visibility.Collapsed;
61 |
62 | private void Tip_ActionButtonClick(Microsoft.UI.Xaml.Controls.TeachingTip sender, object args) => SettingsPanel.Visibility = ((sender.IsOpen = false) is false) ? Visibility.Visible : Visibility.Visible;
63 |
64 | private void ColorPicker_ColorChanged(Microsoft.UI.Xaml.Controls.ColorPicker sender, Microsoft.UI.Xaml.Controls.ColorChangedEventArgs args)
65 | {
66 | Gs2.Color = Helpers.ColorHelper.ChangeColorBrightness(sender.Color, 0.51f);
67 | Gs1.Color = Helpers.ColorHelper.ChangeColorBrightness(sender.Color, 0.25f);
68 | Gs0.Color = Helpers.ColorHelper.ChangeColorBrightness(sender.Color, 0.02f);
69 | Glow.Color = sender.Color;
70 | }
71 |
72 | private async void NewMica_Click(object sender, RoutedEventArgs e) => await Launcher.LaunchUriAsync(new Uri("mica:"));
73 |
74 | public bool IsWin11() => (Environment.OSVersion.Version.Build >= 22000);
75 |
76 | private void InfiniteSwitch_Toggled(object sender, RoutedEventArgs e)
77 | {
78 | if (Mica is not null)
79 | Mica.Visibility = InfiniteSwitch.IsOn ? Visibility.Visible : Visibility.Collapsed;
80 | if (Window.Current.Content is FrameworkElement frameworkElement)
81 | {
82 | frameworkElement.RequestedTheme = ThemeSwitch.IsOn ? ElementTheme.Dark : ElementTheme.Light;
83 | if (Mica10 is not null)
84 | Mica10.ForcedTheme = ThemeSwitch.IsOn ? ApplicationTheme.Dark : ApplicationTheme.Light;
85 | }
86 | }
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/Mica/Materials/AuroraLite.xaml:
--------------------------------------------------------------------------------
1 |
9 |
14 |
600 |
601 |
602 |
--------------------------------------------------------------------------------
/Mica/Materials/AuroraLite.xaml.cs:
--------------------------------------------------------------------------------
1 | using Windows.UI.Xaml.Controls;
2 |
3 | // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
4 |
5 | namespace Mica.Materials
6 | {
7 | public sealed partial class AuroraLite : UserControl
8 | {
9 | public AuroraLite()
10 | {
11 | this.InitializeComponent();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Mica/Materials/BloomView.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Mica/Materials/BloomView.xaml.cs:
--------------------------------------------------------------------------------
1 | using Windows.UI.Xaml;
2 | using Windows.UI.Xaml.Controls;
3 |
4 | // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
5 |
6 | namespace Mica.Materials
7 | {
8 | public sealed partial class BloomView : UserControl
9 | {
10 | public BloomView()
11 | {
12 | this.InitializeComponent();
13 | BloomWebView.Height = Window.Current.Bounds.Height;
14 | BloomWebView.Width = Window.Current.Bounds.Width;
15 | }
16 |
17 | private void Bloom_SizeChanged(object sender, SizeChangedEventArgs e)
18 | {
19 | BloomWebView.Height = Window.Current.Bounds.Height;
20 | BloomWebView.Width = Window.Current.Bounds.Width;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Mica/Materials/RedBloomView.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Mica/Materials/RedBloomView.xaml.cs:
--------------------------------------------------------------------------------
1 | using Windows.UI.Xaml;
2 | using Windows.UI.Xaml.Controls;
3 |
4 | // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
5 |
6 | namespace Mica.Materials
7 | {
8 | public sealed partial class RedBloomView : UserControl
9 | {
10 | public RedBloomView()
11 | {
12 | this.InitializeComponent();
13 | BloomWebView.Height = Window.Current.Bounds.Height;
14 | BloomWebView.Width = Window.Current.Bounds.Width;
15 | }
16 |
17 | private void Bloom_SizeChanged(object sender, SizeChangedEventArgs e)
18 | {
19 | BloomWebView.Height = Window.Current.Bounds.Height;
20 | BloomWebView.Width = Window.Current.Bounds.Width;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Mica/Mica.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | {C54D8977-3DA3-4273-AF12-51B3AC5F6F35}
8 | AppContainerExe
9 | Properties
10 | Mica
11 | Mica
12 | en-US
13 | UAP
14 | 9.0
15 | 10.0.22000.0
16 | 10.0.18362.0
17 | 14
18 | 512
19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
20 | true
21 | True
22 | 0853A17B687504FA4C247CCCAB8E3B33BE0E4B9F
23 |
24 | False
25 | SHA256
26 | True
27 | True
28 | Always
29 | x86|x64|arm64
30 | 0
31 |
32 |
33 | true
34 | bin\x86\Debug\
35 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
36 | ;2008
37 | full
38 | x86
39 | false
40 | prompt
41 | true
42 |
43 |
44 | bin\x86\Release\
45 | TRACE;NETFX_CORE;WINDOWS_UWP
46 | true
47 | ;2008
48 | pdbonly
49 | x86
50 | false
51 | prompt
52 | true
53 | true
54 |
55 |
56 | true
57 | bin\ARM\Debug\
58 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
59 | ;2008
60 | full
61 | ARM
62 | false
63 | prompt
64 | true
65 |
66 |
67 | bin\ARM\Release\
68 | TRACE;NETFX_CORE;WINDOWS_UWP
69 | true
70 | ;2008
71 | pdbonly
72 | ARM
73 | false
74 | prompt
75 | true
76 | true
77 |
78 |
79 | true
80 | bin\ARM64\Debug\
81 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
82 | ;2008
83 | full
84 | ARM64
85 | false
86 | prompt
87 | true
88 | true
89 |
90 |
91 | bin\ARM64\Release\
92 | TRACE;NETFX_CORE;WINDOWS_UWP
93 | true
94 | ;2008
95 | pdbonly
96 | ARM64
97 | false
98 | prompt
99 | true
100 | true
101 |
102 |
103 | true
104 | bin\x64\Debug\
105 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
106 | ;2008
107 | full
108 | x64
109 | false
110 | prompt
111 | true
112 |
113 |
114 | bin\x64\Release\
115 | TRACE;NETFX_CORE;WINDOWS_UWP
116 | true
117 | ;2008
118 | pdbonly
119 | x64
120 | false
121 | prompt
122 | true
123 | true
124 |
125 |
126 | PackageReference
127 |
128 |
129 |
130 | App.xaml
131 |
132 |
133 |
134 |
135 |
136 | MainPage.xaml
137 |
138 |
139 | AuroraLite.xaml
140 |
141 |
142 | RedBloomView.xaml
143 |
144 |
145 | BloomView.xaml
146 |
147 |
148 |
149 |
150 | SettingsBlockControl.xaml
151 |
152 |
153 | SettingsDisplayControl.xaml
154 |
155 |
156 |
157 |
158 | Designer
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 | MSBuild:Compile
221 | Designer
222 |
223 |
224 | MSBuild:Compile
225 | Designer
226 |
227 |
228 | Designer
229 | MSBuild:Compile
230 |
231 |
232 | MSBuild:Compile
233 | Designer
234 |
235 |
236 | Designer
237 | MSBuild:Compile
238 |
239 |
240 | MSBuild:Compile
241 | Designer
242 |
243 |
244 | MSBuild:Compile
245 | Designer
246 |
247 |
248 |
249 |
250 | 8.2.0
251 |
252 |
253 | 1.1.110
254 |
255 |
256 | 0.1.9
257 |
258 |
259 | 6.2.14
260 |
261 |
262 | 7.1.2
263 |
264 |
265 | 7.1.3
266 |
267 |
268 | 2.7.0
269 |
270 |
271 |
272 |
273 | {9bce64f0-f93a-4ea1-bc2f-7e6d2667aeba}
274 | TenMica
275 |
276 |
277 |
278 | 14.0
279 |
280 |
281 |
288 |
--------------------------------------------------------------------------------
/Mica/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
15 |
16 |
17 |
18 |
19 | Mica™️
20 | FireCubeStudios
21 | Assets\StoreLogo.png
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
38 |
39 |
40 |
41 | Mica
42 |
43 |
44 |
45 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Mica/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Mica")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Mica")]
13 | [assembly: AssemblyCopyright("Copyright © 2022")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/Mica/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Mica/SettingsControls/Converters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.UI.Xaml;
3 | using Windows.UI.Xaml.Data;
4 |
5 | #nullable enable
6 |
7 | namespace Mica.SettingsControls
8 | {
9 | ///
10 | /// The generic base implementation of a value converter.
11 | ///
12 | /// The source type.
13 | /// The target type.
14 | public abstract class ValueConverter
15 | : IValueConverter
16 | {
17 | ///
18 | /// Converts a source value to the target type.
19 | ///
20 | ///
21 | ///
22 | public TTarget? Convert(TSource? value)
23 | {
24 | return Convert(value, null, null);
25 | }
26 |
27 | ///
28 | /// Converts a target value back to the source type.
29 | ///
30 | ///
31 | ///
32 | public TSource? ConvertBack(TTarget? value)
33 | {
34 | return ConvertBack(value, null, null);
35 | }
36 |
37 | ///
38 | /// Modifies the source data before passing it to the target for display in the UI.
39 | ///
40 | ///
41 | ///
42 | ///
43 | ///
44 | ///
45 | public object? Convert(object? value, Type? targetType, object? parameter, string? language)
46 | {
47 | // CastExceptions will occur when invalid value, or target type provided.
48 | return Convert((TSource?)value, parameter, language);
49 | }
50 |
51 | ///
52 | /// Modifies the target data before passing it to the source object. This method is called only in TwoWay bindings.
53 | ///
54 | ///
55 | ///
56 | ///
57 | ///
58 | ///
59 | public object? ConvertBack(object? value, Type? targetType, object? parameter, string? language)
60 | {
61 | // CastExceptions will occur when invalid value, or target type provided.
62 | return ConvertBack((TTarget?)value, parameter, language);
63 | }
64 |
65 | ///
66 | /// Converts a source value to the target type.
67 | ///
68 | ///
69 | ///
70 | ///
71 | ///
72 | protected virtual TTarget? Convert(TSource? value, object? parameter, string? language)
73 | {
74 | throw new NotSupportedException();
75 | }
76 |
77 | ///
78 | /// Converts a target value back to the source type.
79 | ///
80 | ///
81 | ///
82 | ///
83 | ///
84 | protected virtual TSource? ConvertBack(TTarget? value, object? parameter, string? language)
85 | {
86 | throw new NotSupportedException();
87 | }
88 | }
89 |
90 | ///
91 | /// The base class for converting instances of type T to object and vice versa.
92 | ///
93 | public abstract class ToObjectConverter
94 | : ValueConverter
95 | {
96 | ///
97 | /// Converts a source value to the target type.
98 | ///
99 | ///
100 | ///
101 | ///
102 | ///
103 | protected override object? Convert(T? value, object? parameter, string? language)
104 | {
105 | return value;
106 | }
107 |
108 | ///
109 | /// Converts a target value back to the source type.
110 | ///
111 | ///
112 | ///
113 | ///
114 | ///
115 | protected override T? ConvertBack(object? value, object? parameter, string? language)
116 | {
117 | return (T?)value;
118 | }
119 | }
120 |
121 | ///
122 | /// Converts a boolean to and from a visibility value.
123 | ///
124 | public class InverseBooleanConverter
125 | : ValueConverter
126 | {
127 | ///
128 | /// Converts a source value to the target type.
129 | ///
130 | ///
131 | ///
132 | ///
133 | ///
134 | protected override bool Convert(bool value, object? parameter, string? language)
135 | {
136 | return !value;
137 | }
138 |
139 | ///
140 | /// Converts a target value back to the source type.
141 | ///
142 | ///
143 | ///
144 | ///
145 | ///
146 | protected override bool ConvertBack(bool value, object? parameter, string? language)
147 | {
148 | return !value;
149 | }
150 | }
151 |
152 | public class NullToTrueConverter
153 | : ValueConverter