Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1385
Using XamSpellChecker with ItemsControl
posted

Using WPF 22.1 I'm creating a spell checker that checks texts aggregated throughout the app into an ItemsControl:

<ScrollViewer Grid.Row="1"
VerticalScrollBarVisibility="Auto">
<ItemsControl ItemsSource="{Binding TextNodes}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="5,0,5,5"
Visibility="{Binding Value, Converter={StaticResource IsNullOrEmptyStringToVisibilityConverter}}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="100" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Text="{Binding Id}" />
<TextBox Grid.Row="1"
VerticalScrollBarVisibility="Auto"
TextWrapping="Wrap"
Text="{Binding Value}" />
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>

I know XamSpellChecker can be bound to multiple controls, but can I bind it to the TextBox controls in my DataTemplate?

Parents Reply Children
No Data