Open Minlor opened 1 month ago
Where did you set the background? The icon is set by an InnerTextBlock
element, you can try replacing the text with spaces.
Hello,
So the way I ended up settings the background is by doing the following:
Target:
SystemTray.OmniButton#ControlCenterButton > Grid > ContentPresenter > ItemsPresenter > StackPanel > ContentPresenter[1] > SystemTray.IconView > Grid > Grid
Value:
Background:=<ImageBrush Stretch="Uniform" ImageSource="E:\Windows\Icons\Lumicons\Icons\System\Network and Sharing.ico" />
Also I now removed the icon with the following
Target:
SystemTray.OmniButton#ControlCenterButton > Grid > ContentPresenter > ItemsPresenter > StackPanel > ContentPresenter[1] > SystemTray.IconView > Grid > Grid > SystemTray.TextIconContent > Grid > SystemTray.AdaptiveTextBlock[2] > TextBlock
Value:
Text=
Though I'm not sure how can I add multiple spaces or just make it empty and not null? Using UWPSpy it just works but with Windhawk it always just adds null instead
Kind regards.
Though I'm not sure how can I add multiple spaces or just make it empty and not null? Using UWPSpy it just works but with Windhawk it always just adds null instead
Windhawk strips spaces, so it doesn't work. Maybe I need to lift this limitation, or add an option for quotes like Text=" "
. For now, I believe you can set the text to empty and in addition set the width.
Though I'm not sure how can I add multiple spaces or just make it empty and not null? Using UWPSpy it just works but with Windhawk it always just adds null instead
Windhawk strips spaces, so it doesn't work. Maybe I need to lift this limitation, or add an option for quotes like
Text=" "
. For now, I believe you can set the text to empty and in addition set the width.
Yup, adding width helped out! Thank you so much for your help! 😄
Also, would probably be a good idea for the quotes (that's also the first thing which I tried) but then I'm wondering what if a user is trying to add quotes for some reason so maybe an escape character.
I'm wondering if there would be a possible way to replace the tray icons, so far currently what I'm doing is just putting a background but the icon is still visible.
For example the volume icon. (The other one is me attempting to replace the network one but failing 😂)