Blogged by Gunnar Giffey on November 26, 2008 and tagged with Format Painter, Text formatting, Text format, C#, .NET.

We have recently been asked if TX Text Control has a similar feature as Microsoft Word's Format Painter feature, so we decided to create a new sample project for our valued customers.
In this project, we use a context menu to provide the option to copy text formatting. If you like, you can also use a button, it's up to you.
You will notice that text formatting information can only be saved if the selection contains only the same formatting, e.g. if the whole selected text has the same font, font size, is bold, and so on. This is due to the fact that we need a defined return value, which would not be the case if the selection would contain different fonts or font sizes.
Here comes the IsCommonValueSelected function into play, which we use to check the selection on same attributes.
You can download the sample from our Source Code Library:
TX Text Control Format Painter
If you have any suggestions or comments please feel free to drop us a line.
Blogged by Björn Meyer on November 21, 2008 and tagged with Strong name, Resources, .NET.
In an earlier blog post, I mentioned that we are offering a new service to sign your TX Text Control DLLs with a digital signature to pass your Windows Vista certification process.
Another important feature of .NET is the strong name signing of assemblies. All assemblies of TX Text Control are signed with the TX Text Control key including the shipped German resource file. As you may know, TX Text Control can be completely localized with our shipped resource kit. These resulting assemblies are not strong named and must be added to the registry as an exception.
Today, I would like to offer you the possibility to send us your resource files that you would like to have strong named with the TX Text Control key. Please use the same procedure like described in the above link:
The process is quite simple:
- Open a support case here and request your code signed files.
www.textcontrol.com/support/case/
- Our support engineers will ask you to send them your distributable files as a zip file.
- After your files were signed, you will receive them by email.
We can offer this service only for version 14.0 of TX Text Control. If you have any questions about code signing or our sign process, feel free to contact me.
Blogged by Björn Meyer on October 30, 2008 and tagged with AltGr, Keystrokes, .NET.
The modifier key AltGr is commonly used to insert special characters or currency symbols. In some languages, it is used to insert accented characters.
By default, TX Text Control implements the functionality of the CTRL modifier on the AltGr key as well. To implement the language specific functionality, you need to cancel the TX Text Control handling by trapping the keystrokes.
As an example, the following code shows how to implement the Polish special characters ż and ź that are inserted when pressing AltGr+Z and AltGr+X:
private void textControl1_KeyDown(object sender, KeyEventArgs e)
{
if (e.Modifiers == (Keys.Alt | Keys.Control))
{
switch(e.KeyCode)
{
case Keys.Z:
textControl1.Selection.Text = "ż";
break;
case Keys.X:
textControl1.Selection.Text = "ź";
break;
}
e.Handled = true;
}
}
More about the different implementations of the AltGr key can be found here:
Wikipedia: AltGr key
Blogged by Björn Meyer on October 28, 2008 and tagged with Chinese, Resources, .NET.
We just published Chinese resources for Traditional (zh-CN) and Simplified (zh-TW) Chinese. You can download the resource assemblies and the source XML files directly from our resource download section:
Download Localized Resources
Here are two screen shots from our dialog boxes:
 |  |
| Page setup dialog | Paragraph dialog |
Blogged by Björn Meyer on October 20, 2008 and tagged with Firefox, WPF, .NET, XBAP.
To integrate a true WYSIWYG document editing into a web application, a client-side control is necessary. 'Rich Text Controls' for ASP.NET were often advertised as WYSIWYG. These plain server-side solutions creating pure HTML and Javascript are simply not powerful enough to render in a true WYSIWYG manner.
TX Text Control .NET Server comes with the BrowserTextControl class. This is a pure .NET assembly that can be integrated into a Windows Forms user control, copied into a folder on server-side and downloaded to the client machine. It is saved automatically in a special download cache folder of Microsoft .NET (the download cache). Based on the code access security of .NET, these assemblies can be embedded and executed in an HTML page of an ASP.NET web application project.
Additionally, it is possible to integrate the BrowserTextControl into a WPF browser application that is deployed as an XBAP application.
These XAML browser applications (XBAP) are using a technique to deploy a WPF application using ClickOnce to client-side.
As of the release of .NET Framework 3.0, XBAPs only run in Internet Explorer. With the new release of .NET Framework 3.5 SP1, they also run in Mozilla Firefox due to a new XBAP extension for Firefox.
To create such an XBAP application, you will need Visual Studio 2008 to create a new WPF browser application project. Additionally, a Windows Forms User Control project must be created like described in our BrowserTextControl documentation.
A Windows Forms Host Control will be placed into a Page of the WPF application. In the constructor of the Page, we can create a new instance of the Windows Forms User Control and attach the user control using the Child property of the hosting interop control:
public Page1()
{
InitializeComponent();
TX = new WindowsFormsControlLibrary1.UserControl1();
windowsFormsHost1.Child = TX;
}
This sample implements a method to load documents into the TX Text Control. Feel free to contact me, if you have any questions or suggestions about this. I look forward to hearing from you.
Download the sample here
Archive