concept text in category .net

appears as: text, text
IronPython in Action

This is an excerpt from Manning's book IronPython in Action.

Table 1.1. Common .NET assemblies and namespaces

Assembly/namespace name

Purpose

System

Contains the base .NET types, exceptions, garbage collection classes, and much more.

System.Data

Classes for working with databases, both high and low level.

System.Drawing

Provides access to the GDI+ graphics system.

System.Management

Provides access to Windows management information and events (WMI), useful for system administration tasks.

System.Environment

Allows you to access and manipulate the current environment, like command-line arguments and environment variables.

System.Diagnostics

Tracing, debugging, event logging, and interacting with processes.

System.XML

For processing XML, including SOAP, XSL/T and more.

System.Web

The ASP.NET web development framework.

System.IO

Contains classes for working with paths, files, and directories. Includes classes to read and write to filesystems or data streams, synchronously or asynchronously.

Microsoft.Win32

Classes that wrap Win32 common dialogs and components including the registry.

System.Threading

Classes needed for multithreaded application development.

System.Text

Classes for working with strings (such as StringBuilder) and the Encoding classes that can convert text to and from bytes.

System.Windows.Forms

Provides a rich user interface for applications.

System.Windows

The base namespace for WPF, the new GUI framework that’s part of .NET 3.0.

System.ServiceModel

Contains classes, enumerations, and interfaces to build Windows Communication Foundation (WCF) service and client applications.

Pages need to store the text in them; plus, they have a title displayed on the tab. As this is the only attribute they have (for the moment), you can represent them with a simple class (see listing 4.3).

Initially, you’re going to write out the contents of the text box, from the Text property, as a text file. Strings on .NET are stored using Unicode, and IronPython strings are no exception. Unicode is an abstract representation of text; when you write the text to the filesystem, an encoding must be used. The encoding is a concrete way of representing text by assigning digits to each character. .NET can choose a default encoding for you, but you need to be aware that this is happening.

Figure 13.11. A VideoBrush showing through the text on a TextBlock