Поделиться через


DatePicker.SelectionBackground Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the background used for selected dates.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls (in System.Windows.Controls.dll)

Syntax

'Declaration
Public Property SelectionBackground As Brush
public Brush SelectionBackground { get; set; }
<sdk:DatePicker>
  <sdk:DatePicker.Background>
    singleBrush
  </sdk:DatePicker.Background>
</sdk:DatePicker>
<sdk:DatePickerBackground="colorString"/>

XAML Values

  • singleBrush
    Within opening and closing property elements for sdk:DatePicker.Background, exactly one object element for an object that derives from Brush. The object element can be one of the following: LinearGradientBrush, RadialGradientBrush, ImageBrush, SolidColorBrush, or VideoBrush.

  • colorString
    The Color for a SolidColorBrush expressed as an attribute string. This can be a named color, an RGB value, or an ScRGB value. RGB or ScRGB may also specify alpha information.

Property Value

Type: System.Windows.Media.Brush
The background used for selected dates.

Remarks

Dependency property identifier field: SelectionBackgroundProperty

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.