Posts

Showing posts from June, 2021

How to count the no. of times the given character in second TextBox appears in First Textbox and add the index and matched character to ListBox

Image
MainWindow  <Window x:Class="WPFWorldTutorial.Views.MainWindow"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         xmlns:prism="http://prismlibrary.com/"         prism:ViewModelLocator.AutoWireViewModel="True">     <Grid>         <StackPanel Orientation="Vertical">             <TextBox Text="{Binding Text}" Height="25" Margin="5"/>             <TextBox Text="{Binding CharToMatch}" Height="25" Margin="5"/>             <Button Content="Match" Command="{Binding MatchCharCommand}" Width="100" Margin="5"/>             <ListBox ItemsSource="{Binding MatchedInfo}">                 <ListBox.Style>                     <Style TargetType="ListBox">                         &l