Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
Group By "skinning"
posted

Hi,

I'm just working my way through the skinning of a datagrid and i've just come across these lines of code.  What are these expressing?  I've not come across this format of colour information before.


<GradientStop Color="sc#1, 0.848967135, 0.848967135, 0.848967135" Offset="0"/>
<GradientStop Color="sc#1, 0.694037557, 0.694037557, 0.694037557" Offset="1"/>

How come there is a different for of representing a colour being used here?  I've never seen a colour expressed as sc#1 How do you change this?

James. 


  • 1215
    posted

    The Color value you've found is using the scRGB model, a model that provides a much wider range of color values than the #AARRGGBB format most of us are used to seeing. WPF supports this color model and the early builds of Blend (originally Expression Interactive Designer) used this model natively. Looks like you've found a brush defined very early in our WPF work!

    If you open the brush in Blend you can see the RGB equivalents for the GradientStops in the Brush editor. The two stops above, converted to #AARRGGBB format are:

    <GradientStop Color="#FFEDEDED" Offset="0"/>
    <GradientStop Color="#FFD9D9D9" Offset="1"/>

    If you do a search on the term "scRGB" you can learn more about the format and WPF's support of it.