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();
About TX Text Control:TX Text Control was originally released in 1991, since then more than 40,000 copies have been sold. Starting off as a single, small DLL,
TX Text Control
has made its way through 16-bit DLL and VBX versions to today‘s
Enterprise edition with its .NET and ActiveX components. The recent
addition to the family,
TX Text Control .NET Server, offers all of
TX Text Control
advanced word processing functionality in an easy-to-use server-side
.NET component. Customers benefit from these years of experience, large
user base, and at the same time, appreciate developing with a mature,
reliable product.
Contact Informations:support@textcontrol.comNorth & South America:Phone: +1 704-370-0110
Phone: +1 877-462-4772 (toll free)
Europe:Phone: +49 (0)421 42 70 67 10
Asia Pacific:Phone: +886 2-2797-8508