I am using ShowInputAsync to display an input box. Some predefined text is set with DefaultText.
MetroDialogSettings settings = new MetroDialogSettings() { DefaultText = "Some text" };
var result = await window.ShowInputAsync("Some title", "Some message", settings);
How to position the caret after the DefaultText?
Users should be able to append to this default text and having the caret before it is not really ergonomic...
A good aproach of setting carret at the end of the TextBox described here.
All you need is to find the InputDialog's TextBox. UserControl implementing InputDialog is
MahApps.Metro.Controls.Dialogs.InputDialogand the needed texbox namedPART_TextBox. There are multiple posible solutions, I propose you to create Blend Behavior and attach it using style (concept take from here).Behavior code:
In oder to attach this behavior you can place the following code in app.xaml