Home ? Source Code ? XAML only WPF Watermarked TextBox

XAML only WPF Watermarked TextBox

maninwest
2015-03-06 01:54:28
The author
View(s):
Download(s): 1
Point (s): 1?
Category Category:
XAMLXAML C SharpC#

Description

and we want that; a watermark should visually appear on top of a textbox. On our TextBlock however, we don't want it be included in any hit test results, so we'll set the IsHitTestVisible property to false.
For theTextBlock's style, we'll default it to collapsed, and then set it to visible when our DataContext's Text property does not have content AND when the TextBox does not have keyboard focus.
And that's it! No converters, no extensions, just pure XAML.

Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
WatermarkExample.sln1,017.00 B2015-03-04|22:11
01.97 kB
App.config189.00 B2015-03-04|22:11
App.xaml587.00 B2015-03-04|22:11
App.xaml.cs349.00 B2015-03-04|22:11
MainWindow.xaml2.18 kB2015-03-04|22:11
MainWindow.xaml.cs682.00 B2015-03-04|22:11
packages.config296.00 B2015-03-04|22:11
01.97 kB
AssemblyInfo.cs2.24 kB2015-03-04|22:11
Resources.Designer.cs2.79 kB2015-03-04|22:11
Resources.resx5.48 kB2015-03-04|22:11
Settings.Designer.cs1.08 kB2015-03-04|22:11
Settings.settings201.00 B2015-03-04|22:11
01.97 kB
MainViewModel.cs1.60 kB2015-03-04|22:11
ViewModelLocator.cs1.36 kB2015-03-04|22:11
WatermarkExample.csproj5.53 kB2015-03-04|22:11
...
Sponsored links

Comments

(Add your comment, get 0.1 Point)
Minimum:15 words, Maximum:160 words
qiuchenzhimeng
2015-04-23

北单比分zhibo www.603090.live 多謝樓主的分析哈,非常感謝。這個文件對我非常有用,消除鋸齒效果很不錯

2063162649
2017-01-20

多謝樓主的分析哈,非常感謝。這個文件對我非常有用,消除鋸齒效果很不錯

  • 1
  • Page 1
  • Total 1

XAML only WPF Watermarked TextBox (11.36 kB)

Need 1 Point(s)
Your Point (s)

Your Point isn't enough.

Get 22 Point immediately by PayPal

Point will be added to your account automatically after the transaction.

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more Points

LOGIN

Don't have an account? Register now
Need any help?
Mail to: [email protected]

切換到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
北单比分zhibo

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D
{ganrao} 黑龙江体彩6十1开奖查询 17500河北20选5走势图 股票涨跌根据什么来的 广东快乐10分玩法技巧 股票推荐公众号可靠吗 河南快三万能 线上推广赌博app违法吗 湖北30选5开奖结果 福彩快三大小单双技巧 河北快三河北十一选五 河南体彩11选5走势图 今天湖北快三预测号 股票软件排行榜前十名 广东好彩一号码走势图 股票交流群微信 欢乐生肖走势图彩经