Open AJolly opened 3 days ago
Hi, since it's not a mod enhancement suggestion, I moved it to a more appropriate place - notification center styling guide. I don't have time to look at it right now, but perhaps somebody will be able to help you. You can also join our Discord server where we have a channel about styles.
Will check out the discord - but isn't it a feature enhancement? (Auto expand all notifications?)
Not for this mod. Windows 11 Notification Center Styler is designed to allow settings styles for UI elements, not for doing specific things like "Auto expand all notifications", which perhaps can be achieved via styles. It could be a suggestion for a new mod, though.
Looks like its a visual state ExpandedStateGroup
-> Expanded/Collapsed
Since we can't directly set the visual state using styles alone, we can't have the notifications appear automatically in the expanded state (unless there happens to be a style somewhere that does directly control the state, like a hypothetical "IsExpandedView" property)
However, what we can do is set how many lines of text each notification will show, and set the height of the element to a value large enough to fit the whole text. something like this for a start:
"controlStyles[0].target": " Windows.UI.Xaml.Controls.TextBlock#Content",
"controlStyles[0].styles[0]": "MaxLines=4",
"controlStyles[0].styles[1]": "Padding=5",
"controlStyles[0].styles[2]": "MinHeight=100",
"controlStyles[0].styles[3]": "TextTrimming=0",
"controlStyles[0].styles[4]": "TextWrapping=3",
"controlStyles[0].styles[5]": "IsTextTrimmed=0"
this would basically show the notification details while still technically being in the collapsed state, I believe that's the best we can achieve right now
@bbmaster123 Thanks, that does help a ton I'm using 0 for padding and removed the MinHeight.
Any chance you know how to increase the width? I've tried defining the width on Windows.UI.Xaml.Window or Windows.UI.Xaml.Internal.RootScrollViewer but then it just ends up offscreen.
I suspect I may need to set something on the Windows.UI.Xaml.Window but all the attributes are empty when I look at it in UWPSpy.
@AJolly
it should be as simple as Width=value
, but if that isn't working you can usually also use MinWidth depending on the target. Also make sure its parent element (if there is one) has enough space for the child element to be widened
I've tried defining the width on Windows.UI.Xaml.Window or Windows.UI.Xaml.Internal.RootScrollViewer but then it just ends up offscreen.
Unfortunately we cannot target the root window in either UWPSpy or windhawk, only the child elements.
If elements are going off screen, its likely the element you want to widen (whole notification panel?) is either being constrained by a parent element, or constrained by a bounding box. If the former, you should be able to just widen the parent element and then the desired child element. If the latter, we would need a whole new windhawk mod to deal with it.
Please check out my guide if you haven't already, I explain this and more in further detail: https://github.com/bbmaster123/FWFU/blob/main/uwpspy.md
Let me know if you have any other questions! :)
@m417z
I'd love a few options to make the windows notification center more useful, 1) letting me a default width 2) Let the notification center be resizable. 3) Auto expand all notifications.
(This all gets a lot more useful if you've 1) Increased the max number of notifications
sqlite3 "%USERPROFILE%\Local\Microsoft\Windows\Notifications\wpndatabase.db" "UPDATE MetaData SET value = '1500' WHERE key = 'toast:maxCount';"
2) Set notification center to stay open, or stay open longer
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell\Launcher] "DisableLightDismiss"=dword:00000001
[HKEY_CURRENT_USER\Control Panel\Accessibility] "MessageDuration"=dword:0000001e
I did poke around with UWPSpy to try and change the width, but I couldn't manage to figure it out for the right elements