
Hi again,
Problem:
The user edit action should be immediately manipulated in that way, that every sign input should be transformed to upper case.
E.g. The user types "qwertz" but he should see "QWERTZ"
I try to solved this in the xaml.cs-File of teh syntaxeditor-Page:
but it didn't work, no changes can be seen in the editor whily typing. What did I made wrong?
private bool doFireChangeEvent = true;
private void editor_DocumentTextChanging(object sender, EditorSnapshotChangingEventArgs e)
{
if (doFireChangeEvent)
{
doFireChangeEvent = false;
string changedtoTUpper = e.NewSnapshot.Text.ToUpper();
ITextChange change =
e.NewSnapshot.CreateTextChange(TextChangeTypes.AutoReplace);
change.ReplaceText(e.NewSnapshot.TextRange, changedtoTUpper);
change.Apply();
doFireChangeEvent = true;
}
}
Thanks again for the help!
Problem:
The user edit action should be immediately manipulated in that way, that every sign input should be transformed to upper case.
E.g. The user types "qwertz" but he should see "QWERTZ"
I try to solved this in the xaml.cs-File of teh syntaxeditor-Page:
but it didn't work, no changes can be seen in the editor whily typing. What did I made wrong?
private bool doFireChangeEvent = true;
private void editor_DocumentTextChanging(object sender, EditorSnapshotChangingEventArgs e)
{
if (doFireChangeEvent)
{
doFireChangeEvent = false;
string changedtoTUpper = e.NewSnapshot.Text.ToUpper();
ITextChange change =
e.NewSnapshot.CreateTextChange(TextChangeTypes.AutoReplace);
change.ReplaceText(e.NewSnapshot.TextRange, changedtoTUpper);
change.Apply();
doFireChangeEvent = true;
}
}
Thanks again for the help!