You need to place this in <Window.Resources>. This also assumes you have created a namespace called local in your window that refers to the namespace that holds your class . Something like this
<Window x:Class="yourClass.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300"
xmlns:local="clr-namespace:Models;assembly=Models" >
<Window.Resources>
<local:GroupingName x:Key="GroupingName"/>
</Window.Resources>
<Grid>
</Grid>
</Window>
Hope this helps
By the way
lester555 wrote:
this is very stupid question
There is no such thing as a stupid question. Only stupid answers. Rather just ask :)