private Grid CreateCaret()
{
var container = new Grid {Name = "Caret"};
var style = new Style(typeof(TextBlock));
style.Setters.Add(new Setter(TextBlock.FontFamilyProperty, new FontFamily("Courier New")));
style.Setters.Add(new Setter(TextBlock.ForegroundProperty, Application.Current.Resources["PhoneForegroundBrush"]));
var textBlock = new TextBlock
{
Style = style,
Text = "|"
};
// TODO: 8.1
var storyboard = CreateBlinkingEffect(textBlock);
textBlock.Loaded += (sender, e) => storyboard.Begin();
container.Children.Add(textBlock);
return container;
}