It's time for another TechNet Guru winner!
Congratulations to Khanna Gaurav, an MCC and our WPF Guru winner for June 2013! To find all the competitors for June (and more information about this monthly contest), see the Wiki article: TechNet Guru Contributions for June 2013.
About Khanna: He is the founder of Volcor Software, Microsoft Community Contributor (MCC) and Microsoft MVP from Ahmedabad, India.
Khanna won with this fantastic contribution:
Set Brush for ScrollViewer Thumb
Here are all the winners:
WPF Technical Guru - June 2013 |
| Gaurav Khanna | Set Brush for ScrollViewer Thumb | Peter Laker: "Good to know if you're not adept at Blend" Ed Price: "Great formatting on the code blocks!" |
| XAML guy | WPF: How to manage available/selected lists. Simple examples. MVVM and Code behind | Ed Price: "It's beautiful. A work of art! From the TOC, to the image at the top, the breakdown of sections, the code snippets, and all the way down. It's easy to read and easy to follow. Great job!" Peter Laker: "A common problem, and a tidy solution :)" |
| Magnus (MM8) | Event handling in an MVVM WPF application | Peter Laker: "Nice event/command primer, lots of detail" Ed Price: "Good formatting on the code, and the image helps you visualize it! Good article!" |
We had a few people come out to compete! Thanks to Guarav, XAML guy, and Magnus! You can find all 5 of their contributions here.
Here's an excerpt from the article:
In WPF/Silverlight ScrollViewer and ScrollBar control doesn't have any property to change color of Thumb dynamically from XAML by setting property. We have to edit the Style of ScrollBar and set the Brush for it according to our requirement. Based on requirement of one of the user on MSDN Forum I decided to create a Custom ScrollViewer which has a property to set Brush for Thumb.
Public
Class
CustomScrollViewer
Inherits
ScrollViewer
Shared
Sub
New
()
DefaultStyleKeyProperty.OverrideMetadata(
GetType
(CustomScrollViewer),
New
FrameworkPropertyMetadata(
GetType
(CustomScrollViewer)))
End
Sub
Public
Property
ScrollBarThumbBrush
As
Brush
Get
Return
GetValue(ScrollBarThumbBrushProperty)
End
Get
Set
(
ByVal
value
As
Brush)
SetValue(ScrollBarThumbBrushProperty, value)
End
Set
End
Property
Public
Shared
ReadOnly
ScrollBarThumbBrushProperty
As
DependencyProperty = DependencyProperty.Register(
"ScrollBarThumbBrush"
,
GetType
(Brush),
GetType
(CustomScrollBar),
New
PropertyMetadata(Brushes.Gray))
End
Class
==================
Read the rest here:
Thanks to Khanna Gaurav for your great contribution to the TechNet Guru contest! You can read about all the June winners here:
Also, for the August Guru competition, see TechNet Guru Contributions - August 2013
Are you a Wiki Ninja? http://technet.com/wiki
- Ninja Ed