[Update to V2] WPF: An adorner for gradient display and deletion)

Source: Internet
Author: User

You can hide or delete a custom modifier element. The target can be any uielement. Demo:

For example, textbox on the interface:

 

After you click show, the custom decorator content appears in the gradient:

 

Click "do not show". The decoration device gradually disappears.

The delete function is the same, but the deleted content cannot be displayed again because the decorator has been deleted from the decoration layer.

 

The principle is very simple. The only thing you need to note is how to add an animation. For details, refer to this article.Article:

WPF: add an animation to the adorner.

 

V2 Update ):

Adds separate control over the time of entry and removal.

Modify the status.

 

Download:

V2Source codeDownload

Note: This is an archive of Microsoft SkyDrive. Please download it directly in your browser. Some download tools may not be available for download.

File Type:. CS

 

V1 SourceCodeAnd Demo project download

Note: This is an archive of Microsoft SkyDrive. Please download it directly in your browser. Some download tools may not be available for download.

ExampleProgramRunning Environment:. NET Framework 4.0 client profile

Source code environment: Visual Studio 2010

Related Article

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.