TX Text Control Words

This chapter explains the parts and structure of sample project TX Text Control Words which base on the Windows.Controls.Ribbon control.

The main window contains a Windows.Controls.Ribbon control, WPF.TextControl, the rulerbars and WPF.StatusBar. The main window class is a composition of different partial classes for having a better modularization. Each component can simply removed, replaced or extended.

For handling multiple files a filehandler is implemented which encapsulates all functionality related to files like:

  • Managing loading, inserting and saving of files
  • Managing of save-, export- and loadsettings
  • Managing of recent loaded files

Additionally an User Access Control is implemented which encapsulates all functionalities related to users and their access rights like:

  • Managing who and what someone can edit of the document.
  • Managing the adding and removing of EditableRegions.
  • Managing a pool of users and their settings like name and password.

The source code for this example is contained in the following directories:

  • %USERPROFILE%\My Documents\TX Text Control 29.0.NET for Windows Forms\Samples\WinForms\VB.NET\TX Text Control Words
  • %USERPROFILE%\My Documents\TX Text Control 29.0.NET for Windows Forms\Samples\WinForms\CSharp\TX Text Control Words

Image

ApplicationMenu

The ApplicationMenu contains functionality such as file operations, application settings.

Image

Windows.Controls.Ribbon control's Application Menu is programmatically filled with above menu items. The implementation can be found in files prefixed with ApplicationMenu.

Image

  • ApplicationMenu: Creates the application menu.
  • ApplicationMenuEvents: Implements the eventhandling for the application menu.

For additional information see :

RibbonTabs

Image

The WPF.RibbonReportingTab is populated by some buttons and groups for loading a sample database and showing a merge preview. The corresponding files can be found in the projectfolder Reporting.

Image

  • ReportingTab_FinishGroup: Creates the group and the Finish and Merge ribbontab.
  • ReportingTab_FinishGroup_PreviewTab: Adds the preview button to FinishGroup.
  • ReportingTab_XXXButton: Adds the buttons XXX to the reportingtab

For additional information see :

File Handling

In chapter Howto: Work With Files is explained how to open, save, export files. These functionalities are encapsulated in a File Handler for handling multiple files (contained in Projectfolder: FileHandling). This FileHander implements some more features like logging and handling recent opened documents, managing the export options and managing the saving state of the active document. The filehandler provides different properties and events which can be used for updating the user interface like in our case setting the window title by filename. The FileHandler's events are handled in FileHandlerEvents for updating the main window's title, showing a message box in any style.

The FileHandler is stored in the MainWindow class. The OptionsDialog provides an User Interface for handling SaveSettings. This dialog interacts with the FileHandler.

The DragDropHandler handles the drag and drop functionality of files and uses the FileHandler for loading them.

Image

For additional information see:

Managing User and Document Access

In chapter HowTo: User Document Permissions is explained how to mange and set document permissions also for a certain user.

These functionalities are encapsulated in a User Access Control which extends above functionality for handling multiple users and their access rights.

The source code is stored in the project folder User Access Control

Image

The entry point of the user access control is the corresponding class and manages the UserInfos.

The UserInfo class encapulates all information of a user.

Dialogs are accessible via the UserAccessControl. The dialog classes providing an user interface for different actions like

  • Adding, removing, editing an user
  • Granting, denying access for a certain user
  • Adding, Removing an EditableRegion for a certain user

For additional information see :