I want to simulate user input to a WPF TextBox. I want to input a character such that the OnPreviewTextInput event is triggered. I tried setting the Text through the Text proper
See the answer to How can I programmatically generate keypress events in C#? for a good description of how to simulate input events.
You could also do:
TextCompositionManager.StartComposition(
new TextComposition(InputManager.Current, textBox, "A"));
This will raise the PreviewTextInput event and then raise the TextInput event and change the text.