Skip to content

Commit c1b964f

Browse files
committed
WinUIBackend: Figure out how to read resource dictionary property values
1 parent a6930b2 commit c1b964f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Sources/WinUIBackend/WinUIBackend.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ public struct WinUIBackend: AppBackend {
6464
_ = application.resources.insert("ToggleSwitchPreContentMargin", 0.0 as Double)
6565
_ = application.resources.insert("ToggleSwitchPostContentMargin", 0.0 as Double)
6666

67+
// TODO: Read in previously hardcoded values from the application's
68+
// resources dictionary for future-proofing. Example code for getting
69+
// property values;
70+
// let iinspectable =
71+
// application.resources.lookup("ToggleSwitchPreContentMargin")!
72+
// as! WindowsFoundation.IInspectable
73+
// let pv: __ABI_Windows_Foundation.IPropertyValue = try! iinspectable.QueryInterface()
74+
// let value = try! pv.GetDoubleImpl()
75+
6776
callback()
6877
}
6978
WinUIApplication.main()

0 commit comments

Comments
 (0)