Share via


CalendarView.BlackoutBackground Property

Definition

Gets or sets a brush that provides the background of a date that can't be selected.

public:
 property Brush ^ BlackoutBackground { Brush ^ get(); void set(Brush ^ value); };
Brush BlackoutBackground();

void BlackoutBackground(Brush value);
public Brush BlackoutBackground { get; set; }
var brush = calendarView.blackoutBackground;
calendarView.blackoutBackground = brush;
Public Property BlackoutBackground As Brush
<CalendarView BlackoutBackground="{StaticResource resourceName}"/>
- or -
<CalendarView BlackoutBackground="colorString"/>
- or -
<CalendarView>
  CalendarView.BlackoutBackground>singleBrush</CalendarView.BlackoutBackground>
</CalendarView>

Property Value

A brush that provides the background of a date that can't be selected.

Windows requirements

Device family
Windows 11 (introduced in 10.0.22000.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v14.0)

Remarks

To mark a date as not selectable, set the CalendarViewDayItem.IsBlackout property to true. For more information, see Updating calendar day items.

Applies to

See also