Skip to content

Replace resource constants with properties in PresentationCore #7519

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

Conversation

ThomasGoulet73
Copy link
Contributor

@ThomasGoulet73 ThomasGoulet73 commented Feb 9, 2023

Contributes to #1

Description

Replace the use of resource constants with properties in PresentationCore. This follows the standard of other .Net projects, like dotnet/runtime.

This PR modifies generated files but I updated MilCodeGen to reflect these changes and I validated my modification to MilCodeGen using this PR: #6135. Here's the commit that updates MilCodeGen: d1707f2.

Customer Impact

None.

Regression

No.

Testing

Local build + CI.

Risk

None.

Microsoft Reviewers: Open in CodeFlow

@ThomasGoulet73 ThomasGoulet73 requested a review from a team as a code owner February 9, 2023 03:42
@ghost ghost assigned ThomasGoulet73 Feb 9, 2023
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Feb 9, 2023
@ghost ghost requested review from dipeshmsft and singhashish-wpf February 9, 2023 03:42
@ghost ghost added the Community Contribution A label for all community Contributions label Feb 9, 2023
@ThomasGoulet73 ThomasGoulet73 changed the title Replace resource constants with properties PresentationCore Replace resource constants with properties in PresentationCore Feb 9, 2023
@dipeshmsft dipeshmsft merged commit 9bd8eda into dotnet:main Mar 20, 2023
@ThomasGoulet73 ThomasGoulet73 deleted the replace-resource-constants-with-properties-presentationcore branch March 21, 2023 02:09
@dipeshmsft
Copy link
Member

@ThomasGoulet73 , thanks for your contribution in this task. Looks like this was last of the assemblies that needed this change, please correct me if I am wrong.

If yes, then we are good to close #1 right ?

@ThomasGoulet73
Copy link
Contributor Author

Thank you @dipeshmsft.

Looks like this was last of the assemblies that needed this change, please correct me if I am wrong.

This PR was for the last assembly but I'm preparing a cleanup PR that will mainly remove this:

<_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='PresentationBuildTasks'">false</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='PresentationCore'">false</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='PresentationFramework'">false</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='PresentationUI' or '$(AssemblyName)'=='PresentationUI'">false</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='ReachFramework'">false</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='UIAutomationClient'">false</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='UIAutomationClientSideProviders'">false</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='UIAutomationProvider'">false</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='System.Windows.Controls.Ribbon' or '$(AssemblyName)'=='System.Windows.Controls.Ribbon'">false</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='System.Xaml'">false</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='WindowsBase'">false</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='WindowsFormsIntegration'">false</_GenerateResourcesCodeAsConstants>

I will mark my next PR as closing #1 so no need to close it manually.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Community Contribution A label for all community Contributions PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants