Skip to content
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

Question: Brushes and Colors Implementation Missing ??? #3038

Closed
VijayanRamachandran opened this issue Aug 4, 2020 · 7 comments
Closed

Question: Brushes and Colors Implementation Missing ??? #3038

VijayanRamachandran opened this issue Aug 4, 2020 · 7 comments

Comments

@VijayanRamachandran
Copy link

Hi,

I am currently doing some prototypes migrating custom controls available in our end from WPF to WinUI.

During prototype I noticed that, in our end there are some WPF custom controls using Brushes and Colors( available in System.Windows.Media ) but equivalent implementation for WinUI is missing.

These implementations will be available soon in near WinUI Preview release ?

I am using right now
VS => Version 16.7.0 Preview 5.0
.Net SDK => dotnet-sdk-5.0.100-preview.4.20268.1-win-x64 / dotnet-sdk-5.0.100-preview.4.20268.1-win-x86

Thanks in advance.

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Aug 4, 2020
@robloo
Copy link
Contributor

robloo commented Aug 4, 2020

The equivalent does exist in UWP. However, the namespace was moved to Windows.UI.Colors in UWP and again to Microsoft.UI.Colors in WinUI.

Also, you might find this useful porting from WPF: https://github.com/robloo/PublicDocs/blob/master/UWPvsWPF.md

@robloo
Copy link
Contributor

robloo commented Aug 4, 2020

I should add while all Colors should be supported, some Brushes are not. Some like VisualBrush are still missing and features like tiling are more difficult #536

@StephenLPeters StephenLPeters added needs-author-feedback Asked author to supply more information. and removed needs-triage Issue needs to be triaged by the area owners labels Aug 4, 2020
@StephenLPeters
Copy link
Contributor

@VijayanRamachandran given Robloo's correct response, can you clarify what wpf feature you are missing?

@VijayanRamachandran
Copy link
Author

@StephenLPeters @robloo ,

I overlooked about Colors.
Yes i noticed now that Colors is available in Microsoft.UI and i could use that.
I am sorry about that. It was my mistake that i overlooked.

Similar like Colors in Microsoft.UI, i was talking about whether Brushes is also available in WinUI in my initial query.

Thanks.

@msft-github-bot msft-github-bot added needs-triage Issue needs to be triaged by the area owners and removed needs-author-feedback Asked author to supply more information. labels Aug 5, 2020
@MikeHillberg
Copy link
Contributor

For brushes you need to use the constructor:

new SolidColorBrush(Colors.Red)

In markup you can use all the same values (ex 'red' or '#FF0000'), whether the property is a Brush or Color type.

@StephenLPeters StephenLPeters added needs-author-feedback Asked author to supply more information. and removed needs-triage Issue needs to be triaged by the area owners labels Aug 5, 2020
@VijayanRamachandran
Copy link
Author

@MikeHillberg

As you mentioned for brushes i will use the constructor and check it.

Thanks.

@msft-github-bot msft-github-bot added needs-triage Issue needs to be triaged by the area owners and removed needs-author-feedback Asked author to supply more information. labels Aug 7, 2020
@StephenLPeters StephenLPeters added needs-author-feedback Asked author to supply more information. and removed needs-triage Issue needs to be triaged by the area owners labels Aug 7, 2020
@msft-github-bot
Copy link
Collaborator

This issue 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants