Colors in XAML

Build 1501 on 14/Nov/2017  This topic last edited on: 22/Mar/2016, at 16:38

You may want to configure colors in various XAML controls, e.g. in footprints:

        <ColStyle Name="DS" Width="40">

          <CellTemplate>

            <StackPanel Orientation="Horizontal">

              <l:CopyActionsIndicator 

                                                                 Value="{Binding Path=[archiveObject:Dests]}" 

                                                                 Foreground="Red" 

                                                                 Content="&#x25A0;" 

                                                                 Header="Copied to:" />

              <l:CopyActionsIndicator 

                                                                 Value="{Binding Path=[archiveObject:Sources]}" 

                                                                 Foreground="#FF8cb2d6" 

                                                                 Content="&#x25A0;" 

                                                                 Header="Copied from:" />

            </StackPanel>

          </CellTemplate>

        </ColStyle>

 

Colors as names

For the list of valid color names in XAML, see http://msdn.microsoft.com/en-us/library/system.windows.media.colors.aspx.

Colors as hex value

The first character is # that indicated that color string is in hex format

Next two characters in the color string indicate opacity: FF = 100% opacity, 50 = 50% opacity and so on.

The rest of the string is RGB value. See also http://en.wikipedia.org/wiki/RGBA_color_space.