Image transform filtering effect in asp.net 2.0

Source: Internet
Author: User

This article describes an easy way to create a custom Web control and makes it available for use in a asp.net 2.0 Web page to display the Microsoft DirectX image conversion filtering effect.

First, Introduction

This article describes an easy way to create a custom Web control and apply it to a asp.net 2.0 Web page that shows the effect of Microsoft DirectX image conversion filtering. The article includes a class library with 11 different controls, each showing some aspects of the Microsoft DirectX Image transformation filtering effect. Of these 11 controls, 5 are page transition effects controls, and the other 6 are filter effect controls that enhance the appearance of the text.

In these 6 filter effect controls that enhance the appearance of the text, each is implemented as a container control. This will allow the user either to type the text directly into the container, or to place a label in the control and apply the effect to the label. The purpose of selecting a Label control is to provide an easy, standards-based HTML method for resizing, centering, and formatting text.

The remaining 5 controls are used to add a page transition effect to a Web page without writing any additional HTML or VB code. To use these controls, users only need to drag them onto the form. However, these controls do not have a corresponding visual component, although the page can be displayed in the browser, and when the user leaves the page, the corresponding transition effect is used to open the next page.

The example project that corresponds to this article contains a simple web site containing a single default.aspx page that shows the top 6 text-enhanced controls and a page transition effect control.

Note the methods that are applied to the demo engineering and control libraries in this article apply only to Internet Explorer and do not provide support for other browser types. If you work in a corporate intranet and you can ensure that all users have access to Internet Explorer, the control set and the methods here may be useful to you. If you publish these controls publicly, users who surf with a non-Internet Explorer browser can still read the appropriate text but the effect will not exist. If you really want to make a public announcement, you can first check the user's browser and if it's not ie, you should suggest that they should use IE to view the site.

Fig. 1. Filtration effect in the demonstration project

Second, start

First, extract the source code included in the class library and demo project. As you examine the corresponding content, you will see that there are two projects in one scenario. Engineering Dxfiltercontrols is a class library that contains the 11 previously mentioned controls. Engineering Dxfiltertestsite is a demo web site that can be displayed on it, and can be viewed on a single Default.aspx Web page.

In the DX filter control project, there are 11 separate controls:

1. CCBlurredLabel
2. CCDropShadow
3. CCEmboss
4. CCEngrave
5. CCGlowingText
6. CCGradient
7. CCPageTransition_Iris
8. CCPageTransition_Pixelate
9. CCPageTransition_RadialWipe
10. CCPageTransition_GradientWipe
11. CCPageTransition_Wheel

As I've mentioned, the first 6 controls are used to enhance the appearance of text (implemented through a Microsoft DirectX filtering application). Each of these controls is constructed into a container, and any text that goes directly into the container or label has the appropriate filtering effect, as long as it can be generated to a Microsoft Internet Explorer browser.

The first 5 controls are designed to provide some text-improvement filtering for container content. The 6th control (ccgradient) is only a panel that has a gradient background and does not actually change or directly affect the text in the container.

The 7th to 11th control is a page transition effect control. You can drag a single page transition control to a form and set its properties (where many of the properties do not have to be set). As a result, the next page to open will be opened with the specified effect when the user exits the current page. Although in this instance, I use these controls to create a transition effect (when transitioning to a new page), however, these transition effects can be configured to invoke the effect when the container page is loaded, and can even be used in a single page to implement the effect of using a new image instead of another image.

Figure 2: Pixel transition effect of a page

In addition, this is not a very complex set of controls, but I think they already have enough to show what filtering can be achieved through DirectX. You can refer to the Microsoft documentation on the website to explore other filtering effects.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.