Some WPF controls such as PopUps, ComboBoxes or ToolTips are always on top of the WPF layer. WPF.TextControl implements the same approach - a separate independent Window is required to provide the true WYSIWYG rendering.
But due to the fact that WPF.TextControl uses a similar approach, you can use the same work-around to draw other controls on top of these controls. The above mentioned elements including TextControl have their own Window which is always displayed on top of other controls. To render a control on top of these controls, you need to encapsulate them in their own Window.
The following code shows how to create and display a Window on top of WPF.TextControl. The container Window itself can have any kind of WPF children:
TextWindow testWindow = new TextWindow(); testWindow.Width = 200; testWindow.Height = 200; testWindow.Owner = Window.GetWindow(this); testWindow.ShowInTaskbar = false; testWindow.WindowStyle= WindowStyle.None; testWindow.AllowsTransparency = true; testWindow.Background = Brushes.Transparent; Point relativePoint = textControl1.TransformToAncestor(this).Transform( new System.Windows.Point(0, 0)); testWindow.Left = relativePoint.X + this.Left; testWindow.Top = relativePoint.Y + this.Top + 50; testWindow.Show();