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

How to Change the Accent for a Custom Control #809

Closed
Camuvingian opened this issue Nov 20, 2013 · 4 comments
Closed

How to Change the Accent for a Custom Control #809

Camuvingian opened this issue Nov 20, 2013 · 4 comments
Assignees
Labels
Milestone

Comments

@Camuvingian
Copy link

All, I have created a custom DataGrid and I have styled this using

<Controls:ResourceDataGrid x:Name="resourceDataGrid" 
                           Style="{StaticResource MetroDataGrid}" /> ...

This works great and I have the default MetroStyle colour of cobalt. Now, i change the accent of my entire application according to the example given in the sample application. All windows and MahApp controls change colour but my custom DataGrid remains cobalt (but correctly Metro styled).

Is there an easy way I can update my controls accent without having to 'skin' the control?

Thanks for your time.

@AzureKitsune
Copy link
Member

Is your custom control using Foreground/Background? You may need to tweak the MetroDataGrid style to work with your custom grid.

@thoemmi
Copy link
Collaborator

thoemmi commented Nov 21, 2013

Maybe this is caused by the StaticResource. Have you tried DynamicResource?

@Camuvingian
Copy link
Author

@Amrykid no the control does not use Foreground/Background. @thoemmi I will try this now and come back to you. Thanks very much for your time LADs, it is most appreciated...

@Camuvingian
Copy link
Author

@thoemmi unfortunately this has not helped. Just to clarify the problem, see the attached screenshot:

slice 1

The grid is styled but the colouring is not updated according to the accent (horrible pink!).

Thanks again.

@punker76 punker76 added this to the v0.14 milestone Mar 24, 2014
@punker76 punker76 self-assigned this Mar 24, 2014
@flagbug flagbug removed this from the v0.14 milestone Aug 2, 2014
@punker76 punker76 added this to the 1.2.0 milestone Jun 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

5 participants