![]() ![]() If you mention the SelectionOpacity="1", it means you cant see through the Selection. The SelectionOpacity determines the opacity value for the selection. You can use ImageBrush, DrawingBrush even VisualBrush here as SelectionBrush for fun. You can easily modify the Brush to the one you want to. In the code above, you can see I have defined a LinearGradient for SelectionBrush which has two GradientStops from 0 which is Red to Gold at 1 Vertically. ![]() We can define different brushes to style selection brush so that the content when selected for our textbox appears to be suited to the environment. The property SelectionBrush is added as DependancyProperty in TextBoxBase, so any control that inherits from TextBoxBase will find this property. SelectionBrush is introduced with WPF 4.0 which allows you to change the selection color, its opacity etc. ![]() ![]() In this article I am going to discuss each of those new features one by one. One of these features, is changing the Selection Brush and Caret color in TextBoxes. There are lots of things that are introduced for the first time which would not be possible with previous versions. Introduction WPF 4.0 comes with lots of stuffs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |