Click here to Skip to main content
12,621,359 members (31,747 online)

Articles by Clifford Nelson (Articles: 42, Tip/Tricks: 28)

Articles: 42, Tip/Tricks: 28

RSS Feed

Average article rating: 4.77

Button Controls
General
Posted: 23 Mar 2016   Updated: 23 Mar 2016   Views: 6,880   Rating: 5.00/5    Votes: 8   Popularity: 4.52
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 160
This gives the code to create a cursor from a character in a font.
Edit Controls
General
Posted: 19 Jan 2012   Updated: 19 Jan 2012   Views: 12,953   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 300
This value converter makes it very quick and easy to add the ability for the user to input equations in text boxes that are bound to numeric properties.
Miscellaneous
General
Posted: 9 Aug 2015   Updated: 9 Aug 2015   Views: 5,573   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 21
Presents a class to help create flexible value and multi-value converters that use the ConverterParameter to specify return values for true and false results using the ?: operator
Silverlight
Controls
Posted: 5 May 2011   Updated: 5 May 2011   Views: 11,871   Rating: 4.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 340
Implements a control to support changing colors for Silverlight Shapes using VisualStateManager
HowTo
Posted: 16 Jun 2011   Updated: 16 Jun 2011   Views: 12,655   Rating: 4.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 181
Provides a way to connect to an external DependencyProperty
Office Development
Microsoft Excel
Posted: 17 Aug 2012   Updated: 17 Aug 2012   Views: 25,455   Rating: 4.89/5    Votes: 6   Popularity: 3.78
Licence: The Code Project Open License (CPOL)      Bookmarked: 24   Downloaded: 1,386
A framework for scanning a worksheet for headers, reading and validating data, providing feedback to the user, and displaying the data in a form with the results.
C#
Enumerations
Posted: 10 Nov 2011   Updated: 27 Jan 2016   Views: 22,918   Rating: 5.00/5    Votes: 11   Popularity: 5.21
Licence: The Code Project Open License (CPOL)      Bookmarked: 20   Downloaded: 458
How to use DescriptionAttribute for enumerations bound to a ComboBox.
General
Posted: 15 Oct 2011   Updated: 15 Oct 2011   Views: 12,863   Rating: 4.11/5    Votes: 5   Popularity: 2.80
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 266
Generic ValueConverter for Binding Enumerations to Check Boxes
Posted: 16 Feb 2012   Updated: 22 Feb 2012   Views: 44,437   Rating: 4.93/5    Votes: 18   Popularity: 6.17
Licence: The Code Project Open License (CPOL)      Bookmarked: 41   Downloaded: 253
Performance and ideas from Anders Hejlsberg INotifyPropertyChanged
Posted: 29 Feb 2012   Updated: 29 Feb 2012   Views: 20,314   Rating: 4.88/5    Votes: 8   Popularity: 4.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 12   Downloaded: 427
This article is about using Rosyln to evaluate user input in a value converter.
Posted: 29 May 2012   Updated: 29 May 2012   Views: 6,351   Rating: 4.33/5    Votes: 3   Popularity: 1.43
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 2
A runtime variables class to support multiple application development.
Posted: 21 Sep 2012   Updated: 21 Sep 2012   Views: 17,391   Rating: 4.93/5    Votes: 5   Popularity: 3.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 200
Demonstrates how to use attributes during run time in a serious application to improve maintainability.
Posted: 19 Apr 2016   Updated: 19 Apr 2016   Views: 3,500   Rating: 5.00/5    Votes: 4   Popularity: 3.01
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 46
A set of extension methods to support conditional Expression Bodied Functions and Properties
Libraries
General
Posted: 27 Mar 2012   Updated: 27 Mar 2012   Views: 71,243   Rating: 4.94/5    Votes: 19   Popularity: 6.32
Licence: The Code Project Open License (CPOL)      Bookmarked: 26   Downloaded: 3,594
This is just an introduction to the EventAggregator, with a sample that is easy to understand.
Windows Presentation Foundation
Controls
Posted: 2 Nov 2010   Updated: 17 May 2011   Views: 67,831   Rating: 4.68/5    Votes: 18   Popularity: 5.79
Licence: The Code Project Open License (CPOL)      Bookmarked: 19   Downloaded: 2,301
Describes how to create a control that inherits from a base control
Posted: 3 Jan 2012   Updated: 3 Jan 2012   Views: 9,421   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 310
An enumeration RadioButtion ListBox control.
Posted: 18 Jun 2012   Updated: 18 Jun 2012   Views: 13,281   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 168
A generic implementation for IValueConverter.
Posted: 21 Nov 2015   Updated: 21 Nov 2015   Views: 2,792   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 70
This article shows how to create a very simple control in C# that overrides the ArrangeOverride, GetVisualChild, and VisualChildrenCount to create a panel that shadows and disables contained controls.
Posted: 16 Feb 2016   Updated: 16 Feb 2016   Views: 2,689   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 90
This article presents a behavior that can make another UIElement visible when the mouse down event occurs on the UIElement this behavior is attached to. Have extended this to directly support fading of a Popup control
Posted: 26 Feb 2016   Updated: 26 Feb 2016   Views: 3,930   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 246
There are cases where it might be desirable to support character input without a keyboard attached in a more embedded application where the keyboard is displayed as part of the window.
Posted: 29 Feb 2016   Updated: 29 Feb 2016   Views: 5,590   Rating: 4.70/5    Votes: 6   Popularity: 3.66
Licence: The Code Project Open License (CPOL)      Bookmarked: 11   Downloaded: 155
This article presents a control that makes it very easy to create an Image control from a font symbol, with special support for Font Awesome.
Posted: 1 Apr 2016   Updated: 1 Apr 2016   Views: 3,030   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 111
This article presents a simple bar graph using an ItemsControl with a custom DataTemplate
Posted: 2 May 2016   Updated: 2 May 2016   Views: 5,870   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 228
Presents code to display bindable HTML text in a WPF RichTextBox or a WebBrowser.
Posted: 5 May 2016   Updated: 5 May 2016   Views: 4,590   Rating: 5.00/5    Votes: 4   Popularity: 3.01
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 66
This presents a way to capture a PropertyChanged on a DependencyObject, in this case to capture when the Content on a ContentPresenter changes and setting focus.
Posted: 14 Jun 2016   Updated: 14 Jun 2016   Views: 3,060   Rating: 4.75/5    Votes: 3   Popularity: 2.27
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 82
This presents as control inherited from the Shape control for displaying an outline font.
Posted: 22 Jun 2016   Updated: 22 Jun 2016   Views: 2,470   Rating: 4.82/5    Votes: 5   Popularity: 3.37
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 74
Format converter to handle more cases than the StringFormat, including infinity, and NaN
Posted: 19 Aug 2016   Updated: 19 Aug 2016   Views: 6,500   Rating: 4.91/5    Votes: 8   Popularity: 4.43
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 168
This is an alternative for "A WPF Custom Control for Zooming and Panning"
Posted: 21 Sep 2016   Updated: 21 Sep 2016   Views: 3,340   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 100
I have had two projects that I have worked on that required a lot of graphics. In general there has been minimal interaction between the user and the graphics, so the implementation has been very straight forward.
Posted: 27 Sep 2016   Updated: 27 Sep 2016   Views: 3,300   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 39
This is an alternative for "How to Embed Arbitrary Content in a WPF Control"
Data Binding
Posted: 2 Nov 2011   Updated: 2 Nov 2011   Views: 23,342   Rating: 4.95/5    Votes: 8   Popularity: 4.47
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 413
How to do dynamic binding of static properties.
Posted: 13 Sep 2015   Updated: 13 Sep 2015   Views: 5,081   Rating: 4.89/5    Votes: 7   Popularity: 4.13
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 115
This article presents an implementation to support IDataErrorInfo with attributes on the properties for WPF. It also covers other aspects of displaying error information using WPF.
Posted: 2 Feb 2016   Updated: 2 Feb 2016   Views: 4,467   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 11   Downloaded: 129
A problem with the WPF MVVM design pattern is closing a window from the ViewModel. This article presents a method that allows the use of dependency properties to be used to control the closing of a window
Posted: 25 May 2016   Updated: 25 May 2016   Views: 5,480   Rating: 3.45/5    Votes: 4   Popularity: 2.05
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 18
Presents simple MarkupExtension for accessing the Properties.Resources and Properties.Settings files. Also, with Resources, which are always strings, conversion is supported.
General
Posted: 8 Jul 2011   Updated: 8 Jul 2011   Views: 8,131   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 152
A special class is needed to support binding a set of flags to a View.
Posted: 5 Oct 2011   Updated: 5 Oct 2011   Views: 17,382   Rating: 4.43/5    Votes: 4   Popularity: 2.67
Licence: The Code Project Open License (CPOL)      Bookmarked: 19   Downloaded: 369
WPF Dynamic Application Settings
Posted: 14 Dec 2011   Updated: 14 Dec 2011   Views: 14,512   Rating: 4.45/5    Votes: 4   Popularity: 2.74
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 163
Discovering the limitations of IValueConverter in WPF
Posted: 20 Aug 2012   Updated: 20 Aug 2012   Views: 23,686   Rating: 4.87/5    Votes: 7   Popularity: 3.98
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 392
This article will show you how to implement a class that will provide type conversion for another class. In this particular case will be providing conversion to and from a string.
Posted: 16 Jun 2016   Updated: 16 Jun 2016   Views: 5,510   Rating: 4.86/5    Votes: 3   Popularity: 2.23
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 56
This is an alternative for "Advanced WPF Localization" that adds functionality for capitalizing and pluralizing the text to be display.
Posted: 26 Oct 2016   Updated: 26 Oct 2016   Views: 1,800   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 44
Presents a concept for creating a masked TextBox, and has the implementation for entering a TimeSpan
Libraries
Posted: 24 Nov 2011   Updated: 24 Nov 2011   Views: 18,400   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 14   Downloaded: 262
A generic WPF/Silverlight value converter.
Posted: 26 Jan 2012   Updated: 26 Jan 2012   Views: 19,023   Rating: 4.20/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 155
A value binding converter for WPF.
Algorithms & Recipes
Math
Posted: 12 Sep 2012   Updated: 14 Sep 2012   Views: 17,745   Rating: 4.45/5    Votes: 4   Popularity: 2.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 12   Downloaded: 0
This is an alternative for "Finding prime numbers".
No blogs have been submitted.

Average tips rating: 4.41

Edit Controls
General
Posted: 9 Aug 2015   Updated: 9 Aug 2015   Views: 4,111   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
This tip provides an alternate way to combine data with text in a WPF control using a ValueConverter that could be considered easier.
Grid & Data Controls
DataSets, DataGrids etc
Posted: 15 Aug 2012   Updated: 2 Oct 2012   Views: 8,650   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 125
This article presents a way to display totally dynamic data in a windows grid using a dictionary.
C#
COM Interop
Posted: 26 Aug 2016   Updated: 26 Aug 2016   Views: 2,570   Rating: 4.60/5    Votes: 4   Popularity: 2.77
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 68
A simple timer that will expire if it is not nudged within a certain time. This will cause an Action to be executed.
Delegates and Events
Posted: 27 Apr 2016   Updated: 27 Apr 2016   Views: 5,760   Rating: 3.40/5    Votes: 4   Popularity: 2.05
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
I have used a Func to set the value of a property.
General
Posted: 8 Jun 2012   Updated: 8 Jun 2012   Views: 8,722   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 224
You can implement BackgroundWorker using Lambdas without any sort of helper class very easily.
Posted: 25 Mar 2013   Updated: 25 Mar 2013   Views: 5,594   Rating: 3.71/5    Votes: 3   Popularity: 1.77
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 41
Design to create a simple tree view that can be copy and pasted
Posted: 11 Jul 2013   Updated: 11 Jul 2013   Views: 8,084   Rating: 3.22/5    Votes: 3   Popularity: 0.86
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 86
Helper for serializing objects to a string
Posted: 25 Jul 2013   Updated: 30 Jul 2013   Views: 25,490   Rating: 4.57/5    Votes: 31   Popularity: 6.81
Licence: The Code Project Open License (CPOL)      Bookmarked: 43   Downloaded: 512
Helper for serializing objects in XML or binary and saving to a file
Posted: 15 Mar 2016   Updated: 15 Mar 2016   Views: 7,030   Rating: 4.10/5    Votes: 7   Popularity: 3.57
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 0
There is a Parse and TryParse for fields, but they cannot be used for properties. Here is a concept to create TryParse that will work for properties.
Windows Presentation Foundation
Controls
Posted: 2 Jun 2012   Updated: 2 Jun 2012   Views: 18,736   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
A rather quick and dirty way of creating a filtered combo box in WPF.
Posted: 6 Jun 2012   Updated: 6 Jun 2012   Views: 15,842   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 290
A little trick that will more completely fill the DatePicker background from the code-behind.
Posted: 26 Aug 2015   Updated: 26 Aug 2015   Views: 4,053   Rating: 4.80/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
If you are having issues with getting the WPF Focus() method working, then maybe all you need to do is add a delay on the Initialized event before setting the focus. This solution is a nice demonstration of the features of TPL, and how easy TPL can make doing asynchronous programming in the UI.
Posted: 10 Mar 2016   Updated: 10 Mar 2016   Views: 2,440   Rating: 4.67/5    Votes: 2   Popularity: 1.40
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 52
When binding to an Enumeration, the Required Attribute does not work if the enumeration does not have a zero value. This validator does work.
Posted: 18 Mar 2016   Updated: 18 Mar 2016   Views: 2,330   Rating: 3.88/5    Votes: 4   Popularity: 2.24
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 65
There may be times when it would be nice to have a timer on a window. This is a behavior that when attached to a TextBlock, will display the time in minutes and seconds since the control was created.
Posted: 24 Mar 2016   Updated: 24 Mar 2016   Views: 3,410   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 87
WPF popup enumerated button control
Posted: 6 Aug 2016   Updated: 6 Aug 2016   Views: 3,250   Rating: 4.83/5    Votes: 9   Popularity: 4.59
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 39
This tip presents a way to have disabled items in your ComboBox
Posted: 5 Oct 2016   Updated: 5 Oct 2016   Views: 2,510   Rating: 4.50/5    Votes: 5   Popularity: 3.22
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 100
Presents and implementation of a control that can be pressed to bring up a Menu.
Posted: 28 Nov 2016   Updated: 28 Nov 2016   Views: 3,330   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 50
The WPF WebBrower control leaves a lot to be desired.
Data Binding
Posted: 5 Sep 2012   Updated: 5 Sep 2012   Views: 13,500   Rating: 4.00/5    Votes: 3   Popularity: 1.67
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 263
The IValueConverter can be used to select a View.
Posted: 21 Nov 2015   Updated: 21 Nov 2015   Views: 1,950   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
Using a breakpoint in this WPF Value Converter which basically does nothing can be of assistance in binding when the object is not well understood.
Posted: 5 Dec 2015   Updated: 5 Dec 2015   Views: 2,141   Rating: 4.17/5    Votes: 3   Popularity: 1.19
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 41
This tip presents a ValidationAttribute that can be applied to enumeration properties. The normal RequiredValidationAttribute normally works but if numbers are assigned to the enumeration values, the default value is zero and that may not be valid.
Posted: 27 Apr 2016   Updated: 27 Apr 2016   Views: 4,570   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 21
This article presents a way to display a message in a single control with several sources in a priority order
Posted: 23 Jun 2016   Updated: 23 Jun 2016   Views: 2,380   Rating: 3.33/5    Votes: 3   Popularity: 1.19
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 57
This presents a simple converter that supports binding to an object, but display of a property in that class.
Posted: 29 Jun 2016   Updated: 29 Jun 2016   Views: 3,180   Rating: 4.89/5    Votes: 4   Popularity: 2.92
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 67
This class based on the ObservableCollection supports updating instead of replacing
General
Posted: 10 Oct 2016   Updated: 10 Oct 2016   Views: 1,660   Rating: 3.40/5    Votes: 3   Popularity: 1.24
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 25
This article presents a behavior that can be used to attach properties to a bound class.
Styles
Posted: 19 Dec 2015   Updated: 19 Dec 2015   Views: 3,220   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
It is not straight forward to change the row selected and hover colors on the Telerik RadGridView. This is a ControlTemplate that works, and works with the detail pane.
XAML
Posted: 1 Oct 2015   Updated: 1 Oct 2015   Views: 4,431   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 94
Presents a behavior to prevent entry of anything but digits into a control
Collections
General
Posted: 2 Jul 2012   Updated: 2 Jul 2012   Views: 31,107   Rating: 3.67/5    Votes: 2   Popularity: 1.10
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 367
Why didn’t Microsoft provide this in the ObservableCollection?
No reference articles have been posted.

Clifford Nelson
Software Developer (Senior) Clifford Nelson Consulting
United States United States
Has been working as a C# developer on contract for the last several years, including 3 years at Microsoft. Previously worked with Visual Basic and Microsoft Access VBA, and have developed code for Word, Excel and Outlook. Started working with WPF in 2007 when part of the Microsoft WPF team. For the last eight years has been working primarily as a senior WPF/C# and Silverlight/C# developer. Currently working as WPF developer with BioNano Genomics in San Diego, CA redesigning their UI for their camera system. he can be reached at qck1@hotmail.com.


Advertise | Privacy | Mobile
Web02 | 2.8.161128.1 | Last Updated 2 Dec 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid