UserControl's Resources as UserControl's DataContext?
问题 Is it possible to give UserControl's Resources(Or one of its resource) as UserControl's DataContext? I tried to bind a Button's Command Property in a DataGrid's CellTemplate to a property in my ViewModel. If it were use a ListBox instead of DataGrid this works for me such as below, <ListBox.ItemTemplate> <DataTemplate> <HyperlinkButton Content="{Binding DESCRIPTION}" Command="{Binding DataContext.SelectSingleBackCommand, ElementName=LayoutRoot}"/> </StackPanel> </DataTemplate> </ListBox