-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete button Styling moved to CommonResource.xaml ; Issue #10454 #11088
Conversation
<!-- DELETE BUTTON STYLING IN COLORSCHEMES.XAML FILE --> | ||
<ResourceDictionary.ThemeDictionaries> | ||
<ResourceDictionary x:Key="Light"> | ||
<Style x:Key="SecondaryTextBlockStyle" TargetType="TextBlock"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You cannot use the x:Key="SecondaryTextBlockStyle"
key here because I already used this key above for a different purpose. You need to name this style differently here like calling it x:Key="DeleteButtonStyle"
here and below in the other theme dictionaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TargetType="TextBlock"
is also not right.... I thought this was targeting Button
?
<SolidColorBrush x:Key="ButtonBackground" | ||
Color="Firebrick" /> | ||
<SolidColorBrush x:Key="ButtonBackgroundPointerOver" | ||
Color="#C23232" /> | ||
<SolidColorBrush x:Key="ButtonBackgroundPressed" | ||
Color="#A21212" /> | ||
<SolidColorBrush x:Key="ButtonForeground" | ||
Color="White" /> | ||
<SolidColorBrush x:Key="ButtonForegroundPointerOver" | ||
Color="White" /> | ||
<SolidColorBrush x:Key="ButtonForegroundPressed" | ||
Color="White" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these likely need to turn into Setter
items on Properties
that are a part of Button
with the color or brush binding to the relevant properties. It's sort of a backwards declaration to how it is done on an individual button override.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like this builds either. Did you F5 it in Visual Studio to see if your shared style works?
Thanks for reviewing.
I have gone through all your replies and I'll make all the required changes.
I'll F5 it and see if it works after correcting the current code.
The terminal/src/cascadia/TerminalSettingsEditor/Launch.xaml Lines 115 to 118 in 608a49e
They may also need to have the terminal/src/cascadia/TerminalSettingsEditor/Launch.xaml Lines 17 to 19 in 608a49e
|
It doesn't look like this builds either. Did you F5 it in Visual Studio to see if your shared style works? |
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. |
Issue #10454
There are a few places in the Settings UI where we have a "delete button":
Actions Page
Color Schemes Page
Profiles Page - Delete Profile
(PR Allow creating and editing unfocused appearances in the SUI #10317) Profiles Page - Delete Appearance: (just look up "Firebrick")
I moved these over to CommonResources.xaml.
I referred https://github.com/microsoft/microsoft-ui-xaml/blob/main/dev/CommonStyles/Common_themeresources.xaml
as a reference for the code modification.
The styling code for "delete button" where moved to Common Resource.xaml file