You can change the selection colors and the selection theme in Spread WinRT. This allows you to draw more attention to selections or change the selection colors to match the application appearance.

You can specify selection colors with the SelectionBorderColor, SelectionBackground, or SelectionBorderThemeColor property. The SelectionBackground property uses a Brush object. The SelectionBorderColor property uses a Color object. The SelectionBorderThemeColor property uses a string object.

This example sets the SelectionBorderColor and SelectionBackground properties.

Spread WinRT and Selection Colors
Selection Colors


C#
<code class="language-csharp">gcSpreadSheet1.Sheets[0].SelectionBackground = new SolidColorBrush(Windows.UI.Colors.Magenta);
gcSpreadSheet1.Sheets[0].SelectionBorderColor = Windows.UI.Color.FromArgb(150, 10, 100, 99);

VB
<code class="language-csharp">GcSpreadSheet1.Sheets(0).SelectionBackground = New SolidColorBrush(Windows.UI.Colors.Magenta)
GcSpreadSheet1.Sheets(0).SelectionBorderColor = Windows.UI.Color.FromArgb(150, 10, 100, 99)

You can set a theme color to one of six accent colors, two dark colors, two light colors, a hyperlink color, or a followed hyperlink color. The color property names are Accent 1-6, BackgroundColor1, BackgroundColor2, TextColor1, TextColor2, FollowedHyperlink, and Hyperlink. You can specify an additional shade with the Accent option (100 to -50). The properties are listed in the ThemeColor class.

This example sets the SelectionBorderThemeColor property.

Spread WinRT and Selection Colors
Selection Theme


C#
<code class="language-csharp">gcSpreadSheet1.Sheets[0].SelectionBorderThemeColor = "Accent 3 40";

VB
<code class="language-csharp">GcSpreadSheet1.Sheets(0).SelectionBorderThemeColor = "Accent 3 40"

This example uses the Hyperlink option for the SelectionBorderThemeColor property.

Spread WinRT and Selection Colors
Selection Theme


C#
<code class="language-csharp">gcSpreadSheet1.Sheets[0].SelectionBorderThemeColor = "Hyperlink";

VB
<code class="language-csharp">GcSpreadSheet1.Sheets(0).SelectionBorderThemeColor = "Hyperlink"