WPF Document Features Wednesday, Dec 24 2008 

WPF provides an array of features that enable you to create rich, document-based content.

Document Types:

  1. Fixed Document Types
  2. Flow Document Types

Fixed Document Types: It enable a precise presentation, independent of the display or printer hardware.

Flow Document Types:
It dynamically adjust their content based on variables such as window size.

Document Controls and Text Layout

WPF comes with the following controls for displaying of document content and text:

  • Document Viewer displays fixed document content in read-only mode.
  • FlowDocumentReader enables you to switch between several viewing modes.
  • FlowDocumentPageViewer shows content a page at a time.
  • FlowDocumentScrollViewer shows content in a scrolling mode.
  • Text Block displays small amounts of text.

 

Document Packaging:

WPF provides efficient document packaging with the System.IO.Packaging APIs, which include the default Zip Package implementation. An object in a package is a Package Part and you can add additional information to a package by using a Package Relationship.

 

XML Paper Specification:

XML Paper Specification (XPS) is a subset of XAML that is targeted towards fixed format documents. The XPS Document format conforms to the Open Packaging Conventions for data organization and enables users to create, share, print, and archive paginated documents.


Powerful Layout and Control Features of WPF Applications Tuesday, Dec 23 2008 

WPF provides new techniques for application development, and makes better use of current hardware and technologies. These significant advances include several features that relate to the layout and control of applications, as described in the following table.

 

Feature

Description

Layout WPF provides layout elements to enable you to build an adaptable user interface. These elements include a flow-style layout, where content flows left to right and then onto the start of the next line. WPF also provides a grid, which enables table-like layouts.
 

 

The grid layout enables you to resize content automatically or proportionally. You can nest layout elements to produce complex layouts and write new element types if the built-in types are not suitable.

Content Model The templates for many controls, such as labels and captions, contain placeholders for additional content, which allows for the composition of elements. Traditionally, these placeholders allowed only text, or sometimes a bitmap. WPF has a flexible content model that enables you to use any content in these placeholders, including other controls, drawings, or animations.
 

 

This lack of restrictions enables a host of visual design possibilities and includes a great deal of power for visual designers.

Lookless Controls In WPF, most controls are lookless because WPF disassociates the appearance from the control. Controls provide behavior, but you can easily customize the entire appearance of a control without the need to write a custom control. Controls usually have a built-in template that provides a default appearance; however, you can replace this template to change the look of the control.
 

 

This feature means that WPF controls are much more flexible than Windows Forms or Win32 user interface components.

Data binding With WPF controls, you can use anything as the content of the control, including dynamic content from a data source.
 

 

WPF data binding provides a simple and consistent way for applications to present and interact with data. You can bind elements to data from a variety of data sources and use data templates to specify how a control must display an object. Data templates act as a bridge between objects and the user interface, and give designers great flexibility to manage data presentation.

Styles Styles are lists of properties and values that enable consistency across an application. You can apply a style to any element in a user interface and use a style to set any property.
 

 

You can only apply a style to framework elements. Styles are a declarative feature and this enables you to manage the look of an application independently of its behavior and structure.

Triggers A trigger is a declarative mechanism that specifies how a control should respond to certain stimuli. You can declare a trigger inside a style or a template. One use of a trigger is to start an animation.
 

The declarative nature of triggers enables designers to create a user interface that responds to actions without the need for code from a developer.

ASP.NET 3.5 Windows-Based Authentications Monday, Dec 15 2008 

ASP.NET 3.5 provides to use Windows and Form authentication to our application. From this post we can see how to use Windows authentication in our application.
Authentication is the process of identifying and validating the client accessing your application. Simpler, it is the process of identifying “Who” the end user is and when they visit the site. Authentication is typically used in combination with Authorization — which is the process of figuring out whether the authenticated user has permissions to access a particular page/resource or to perform some action. In ASP.NET terms, authentication is the process that determines the identity of a user. After a user has been authenticated, a developer can determine if the identified user has authorization to proceed. It is impossible to give an entity authorization if no authentication process has been applied. You should never authorize access to resources you mean to be secure if you have not applied an authentication process to the requests for the resources