Some of the filter effects in WPF--effect Library

Source: Internet
Author: User

WPF supports Photoshop-like filter functionality, called effect. In. Net 4.0, WPF deprecated support for bitmapeffect and shifted to using effect classes that support GPU acceleration, for example, we can use the following code to generate a button with a shadow effect.

1 <Button... >2     <Button.effect>3         <Dropshadoweffect/>4     </Button.effect>5 Hello6 </Button>

The system has brought in more than ten kinds of effect, basically can meet most of our processing requirements. If there is an HLSL basis, we can write our own special effects. The following two articles on MSDN describe this process in detail:

    • gpu-accelerated Custom effects for WPF
    • Writing Custom gpu-based Effects for WPF

Microsoft also offers some special effects libraries, the WPF effects library, which can be previewed on Channel 9, which provides a number of common filter effects: sharpening, highlighting, twisting, blurring, highlighting, and more, as well as a range of transition effects such as blinds, dissolve, rotate, zoom, and more. It's easy to create cool WPF programs. Also support sliverlight, but the egg WINRT is not support effect, WINRT API and WPF is almost weak, look forward to Win10 version of Metro programs, such as more open some API bar, otherwise it really does not mention what development power.

This library is a bit of a hassle to compile (some places do not compile with VS2013), so I uploaded a compiled version here to download. It should be stated that:

    1. Many preview images were built into the original project, resulting in a large volume, so I removed the built-in bitmap, and transitioneffects used the JPG format file in the local My Pictures folder, which cannot be previewed if there are no pictures in the folder.
    2. A few PNG files were used as masks in the Transitioneffects project, causing the library to reach a volume of 2m (feeling that the masks could be generated when they were fully operational) and that it was not easy to publish. So I compiled a version that removed the images.

Because the whole project is larger, I uploaded to the Baidu Network disk: Click to download.

Some of the filter effects in WPF--effect Library

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.