.NET
Microsoft Technologies based on the .NET software framework.
3,934 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I've an other question: How to binding ViewModel's SearchText variable to the DataGrid Cell as a converter parameter. I'm using a converter to change ViewModel's list's field name: "content" to highlightedText textBlock. but the Convert method can't get the ViewModel's SearchText variable. parameter is null here.
public object Convert(object value, Type targetType, object parameter, string language)
{
// parameter is null here.
var searchText = parameter
}
<localGrid:DataGridTemplateColumn Header="Content">
<localGrid:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ContentPresenter Content="{Binding Path=Content,
Converter={StaticResource HighlightTextConverter},
ConverterParameter={Binding ElementName=EditPage, Path=ViewModel.SearchText}}"/>
</DataTemplate>
<localGrid:DataGridTemplateColumn.CellTemplate>
<localGrid:DataGridTemplateColumn>