BulletDecorator::Background Property
Gets or sets the background color for a BulletDecorator control.
Assembly: PresentationFramework (in PresentationFramework.dll)
Property Value
Type: System.Windows.Media::BrushThe background color for the Bullet and Child of a BulletDecorator. The default is nullptr.
The Background property defines the Brush to use to fill the area within the BulletDecorator. For some parent layout elements, the area that is defined for the BulletDecorator may extend beyond its Bullet and Child content. For example, if the BulletDecorator is the single child of a cell in a Grid control, the Background property applies to the whole cell. This occurs because the content in a Grid cell is stretched in all directions to fill the cell, by default. However, if you set the VerticalAlignment property to Center for the BulletDecorator, the Background property only affects the actual content area of the BulletDecorator. Alternatively, you can enclose the BulletDecorator in a Panel element.
The following examples show how to set the Background property on a BulletDecorator control.
<BulletDecorator Grid.Row="1" Grid.Column="0" Margin="0,5,0,0" VerticalAlignment="Center" Background="Yellow"> <BulletDecorator.Bullet> <Image Source="images\apple.jpg"/> </BulletDecorator.Bullet> <TextBlock Width="100" TextWrapping="Wrap" HorizontalAlignment="Left" Foreground ="Purple"> A Simple BulletDecorator </TextBlock> </BulletDecorator>
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.