Modify the display of textbox controls in WPF (figure)

Source: Internet
Author: User

Display after default and template Modification

< Style targettype = " {X: Type textbox} " >
< Setter Property = " Template " >
< Setter. Value >
< Controltemplate targettype = " {X: Type textbox} " >
< Grid >
< Border background = " {Templatebinding background} " Cornerradius = " 5 "   />
< Rectangle radiusx = " 5 " Radiusy = " 5 " Width = " 10 " Horizontalalignment = " Left " >
< Rectangle. Fill >
< Lineargradientbrush startpoint = " 0, 0 " Endpoint = " 1, 0 " >
< Lineargradientbrush. gradientstops >
< Gradientstop offset = " 0 " Color = " Black "   />
< Gradientstop offset = " 0.3 " Color = " Yellowgreen "   />
< Gradientstop offset = " 1 " Color = " Transparent "   />
</ Lineargradientbrush. gradientstops >
</ Lineargradientbrush >
</ Rectangle. Fill >
</ Rectangle >
< Rectangle radiusx = " 5 " Radiusy = " 5 " Height = " 10 " Margin = " 3, 0, 0 " Verticalalignment = " Top "   >
< Rectangle. Fill >
< Lineargradientbrush startpoint = " 0, 0 " Endpoint = " 0, 1 " >
< Lineargradientbrush. gradientstops >
< Gradientstop offset = " 0 " Color = " Black "   />
< Gradientstop offset = " 0.3 " Color = " Yellowgreen "   />
< Gradientstop offset = " 1 " Color = " Transparent "   />
</ Lineargradientbrush. gradientstops >
</ Lineargradientbrush >
</ Rectangle. Fill >
</ Rectangle >
< Border cornerradius = " 5 " Borderbrush = " Black " Borderthickness = " 1 "   />
< Scrollviewer name = " Part_contenthost " Margin = " 2 "   />
< Border cornerradius = " 6, 6, 0, 0 " Height = " 15 " Verticalalignment = " Top " >
< Border. Background >
< Lineargradientbrush startpoint = " 0, 0 " Endpoint = " 0, 1 " >
< Lineargradientbrush. gradientstops >
< Gradientstop offset = " 0 " Color = " #60 ffffff "   />
< Gradientstop offset = " 0.7 " Color = " #40 ffffff "   />
</ Lineargradientbrush. gradientstops >
</ Lineargradientbrush >
</ Border. Background >
</ Border >
</ Grid >
</ Controltemplate >
</ Setter. Value >
</ Setter >
</ Style >

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.