WPF DataGrid get Cell Tag

Mar 9, 2010 at 3:31 PM
Edited Mar 9, 2010 at 3:34 PM

Hi everybody,

How can I get the Tag value of a single Cell in a DataGrid ?

In order to set the Tag, I do the following in xaml:

<toolkit:DataGridTemplateColumn >
	<toolkit:DataGridTemplateColumn.CellTemplate>
		<DataTemplate>
			<Rectangle Tag="{Binding Reports, Converter={StaticResource ReportTags}}">
				<Rectangle.Fill>
					<ImageBrush ImageSource="{Binding Reports, Converter={StaticResource ReportRendering}}" Stretch="None" />
				</Rectangle.Fill>
			</Rectangle>
		</DataTemplate>
	</toolkit:DataGridTemplateColumn.CellTemplate>
</toolkit:DataGridTemplateColumn>

I found the method for 

DataGridCellInfo

.Column.GetValue(FrameworkElement.TagProperty)

but it only applies to column. Is there a way to get the Tag for any child of a single Cell ?

Thanks in advance

Andrea