You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
}
this.fooTextBox.Refresh();
}
+
+ private void Find_Click(object sender, RoutedEventArgs e)
+ {
+ this.fooTextBox.Document.SetFindParam(this.FindPattern.Text, false, System.Text.RegularExpressions.RegexOptions.None);
+ var it = this.fooTextBox.Document.Find();
+ it.MoveNext();
+ if (it.Current != null)
+ {
+ SearchResult sr = it.Current;
+ this.fooTextBox.JumpCaret(sr.Start);
+ this.fooTextBox.Selection = new FooEditEngine.TextRange(sr.Start, sr.End - sr.Start + 1);
+ this.fooTextBox.Refresh();
+ }
+ }
}
public class TextRangeConveter : System.Windows.Data.IValueConverter
{