This project is read-only.

Style Does Not Seem To Set

Mar 29, 2012 at 12:20 AM

Hello all,

I am using .Net 4.0 with the Expression Blend version and while my property grid looks pretty decent, I am not getting any colors.  I'm not sure if I should be expecting the black expression blend image on the Home page, but something appears to be wrong.  I would like to customize the feel but it seems that any changes I make in my Brushes.xaml page don't seem to change anything.  Is there something I need to do to activate it?

I checked out the version right before it was converted back to .Net 3.5 and I am using VS 2010.  I did have to change some things to make mine work but they didn't take too long to track down. (Changes:  Add in the Generic.xaml/ExpressionBlend.xaml into my own App.xaml.  Update some of the paths in the MergedDictionaries to account for my project name rather than the included Demo project.  Had to add the trick to get my project to be able to resolve the Dictionaries in my app.xaml file...notice the snippet at the bottom with the dummy style.  

Anyways, any help would be much appreciated.  The Grid looks great and I am curious how active anyone is here.  I figure if my grid is able to locate the other Xaml files that correspond to the different Windows Controls, it should be able to find the Brushes file.  Additionally, I would expect my app to have an error if it were unable to resolve an Id for a specific brush.  Anyways, seems strange to me.


Snippet Mentioned Above (In my App.xaml):

                 <ResourceDictionary Source="/Platform;component/Themes/Generic.xaml" /> 
            <Style TargetType="{x:Type Window}"/>

Mar 29, 2012 at 1:30 AM

It may have something to do with the Brushes having their colors contain Hex values?  I have been playing with other controls and using the Color set for say a background will not work with "#FFFFFFFF" but does for the explicit "Black" (I tried both a SolidColorBrush and the raw Color).  Anyways, I wonder if I'm missing a TypeConverter or something?  Changing the Brushes to use a Color string instead of the Hex value didn't seem to work either so the hook into that file seems to be broken somehow.  I changed many of them to a single Color (Green) and everything is still white.  That must be the "At least we tried" style I guess.

Anyways, I'll post if I find anything else.  Thanks much.


Mar 29, 2012 at 1:44 AM

Ok...So I do know that for example the PropertyGrid.xaml can have its colors changed from the Brush ResourceId to raw colors and I can see the difference.  However, I am still a little bit stumped as to what is going on.  Apparently, I don't get anything out of the Brush Xaml file.  I guess I will have to look and see why but for now I'm not sure.


Thanks much.