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