# Badge is Missing When a Control has a Custom Control Template

## Environment

<table>
	<tbody>
		<tr>
			<th scope="row">Product Version</th>
			<td>2022.3.1109</td>
		</tr>
		<tr>
			<th scope="row">Product</th>
			<td>RadBadge for WPF</td>
		</tr>
	</tbody>
</table>

## Description

`RadBadge` is not displayed when it is set on a control with custom control template.

## Solution

The RadBadge control requires an `AdornerLayer`, in order to be displayed. When creating a custom ControlTemplate for a control, you could wrap the root element with an `AdornerDecorator` instance to apply an AdornerLayer onto its child elements in the visual tree.

**Wrapping the root element of a ControlTemplate with an AdornerDecorator**

```XAML
    <Window.Template>
        <ControlTemplate TargetType="{x:Type Window}">
            <AdornerDecorator>
                <Grid x:Name="rootElement">
                    
                </Grid>
            </AdornerDecorator>
        </ControlTemplate>
    </Window.Template>
```
