Posts

Post not yet marked as solved
1 Replies
540 Views
I'd like to implement a command (application menu item) that would modify @SceneStorage property for currently selected window or tab. My understanding is, because it's a SceneStorage, it has to be defined in my (main) View. And in my case it must be SceneStorage because each (main) View, regardless if it's a window or a tab may have this value different (different look and feel for given window - enum backed by @SceneStorage). And it looks I'm stuck. I found a sample here - https://developer.apple.com/forums/thread/651748. Unfortunately FocusedBinding seems to work only for TextEditor view (as someone stated there), and even in this case it doesn't work if TextEditor is a ToolbarItem. And I need to make it work for an enum feeding View's ToolbarItem Picker. Has anyone have any idea how I could solve this requirement? I'd really like to give users the ability to modify window L&F using commands/menu, not only by clicking on UI elements. BR, Krystian
Posted
by elewarr.
Last updated
.