Click here to Skip to main content
14,358,929 members

Articles by Clifford Nelson (Articles: 50, Tip/Tricks: 60)

Articles: 50, Tip/Tricks: 60

RSS Feed

Average article rating: 4.84

Button Controls
General
Posted: 23 Mar 2016   Updated: 2 Apr 2018   Views: 21,750   Rating: 5.00/5    Votes: 15   Popularity: 5.88
Licence: The Code Project Open License (CPOL)      Bookmarked: 20   Downloaded: 424
This gives the code to create a cursor from a character in a font.
Combo & List Boxes
General
Posted: 25 Apr 2018   Updated: 25 Apr 2018   Views: 7,670   Rating: 4.73/5    Votes: 11   Popularity: 4.92
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 146
Concept to create a Singleton for WPF MVVM Binding, and using Weak reference for the property that is bound to.
Edit Controls
General
Posted: 19 Jan 2012   Updated: 19 Jan 2012   Views: 23,310   Rating: 5.00/5    Votes: 9   Popularity: 4.77
Licence: The Code Project Open License (CPOL)      Bookmarked: 15   Downloaded: 393
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: 2 Apr 2018   Views: 16,420   Rating: 4.14/5    Votes: 13   Popularity: 4.61
Licence: The Code Project Open License (CPOL)      Bookmarked: 24   Downloaded: 183
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: 20,250   Rating: 4.89/5    Votes: 9   Popularity: 4.67
Licence: The Code Project Open License (CPOL)      Bookmarked: 14   Downloaded: 394
Implements a control to support changing colors for Silverlight Shapes using VisualStateManager
HowTo
Posted: 16 Jun 2011   Updated: 16 Jun 2011   Views: 21,400   Rating: 4.67/5    Votes: 9   Popularity: 4.45
Licence: The Code Project Open License (CPOL)      Bookmarked: 14   Downloaded: 224
Provides a way to connect to an external DependencyProperty
Office Development
Microsoft Excel
Posted: 17 Aug 2012   Updated: 17 Aug 2012   Views: 44,190   Rating: 5.00/5    Votes: 13   Popularity: 5.40
Licence: The Code Project Open License (CPOL)      Bookmarked: 32   Downloaded: 1,712
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: 40,550   Rating: 5.00/5    Votes: 21   Popularity: 6.61
Licence: The Code Project Open License (CPOL)      Bookmarked: 27   Downloaded: 593
How to use DescriptionAttribute for enumerations bound to a ComboBox.
General
Posted: 15 Oct 2011   Updated: 15 Oct 2011   Views: 22,930   Rating: 4.75/5    Votes: 13   Popularity: 5.13
Licence: The Code Project Open License (CPOL)      Bookmarked: 17   Downloaded: 328
Generic ValueConverter for Binding Enumerations to Check Boxes
Posted: 16 Feb 2012   Updated: 22 Feb 2012   Views: 61,680   Rating: 4.94/5    Votes: 26   Popularity: 6.91
Licence: The Code Project Open License (CPOL)      Bookmarked: 46   Downloaded: 278
Performance and ideas from Anders Hejlsberg INotifyPropertyChanged
Posted: 29 Feb 2012   Updated: 29 Feb 2012   Views: 36,140   Rating: 4.97/5    Votes: 17   Popularity: 5.98
Licence: The Code Project Open License (CPOL)      Bookmarked: 20   Downloaded: 606
This article is about using Rosyln to evaluate user input in a value converter.
Posted: 29 May 2012   Updated: 29 May 2012   Views: 8,950   Rating: 5.00/5    Votes: 11   Popularity: 5.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 19
A runtime variables class to support multiple application development.
Posted: 21 Sep 2012   Updated: 21 Sep 2012   Views: 27,910   Rating: 4.95/5    Votes: 12   Popularity: 5.35
Licence: The Code Project Open License (CPOL)      Bookmarked: 14   Downloaded: 238
Demonstrates how to use attributes during run time in a serious application to improve maintainability.
Posted: 19 Apr 2016   Updated: 19 Apr 2016   Views: 6,470   Rating: 5.00/5    Votes: 11   Popularity: 5.21
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 82
A set of extension methods to support conditional Expression Bodied Functions and Properties
Libraries
General
Posted: 27 Mar 2012   Updated: 27 Mar 2012   Views: 105,310   Rating: 4.96/5    Votes: 29   Popularity: 7.26
Licence: The Code Project Open License (CPOL)      Bookmarked: 34   Downloaded: 4,226
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: 89,140   Rating: 4.82/5    Votes: 27   Popularity: 6.74
Licence: The Code Project Open License (CPOL)      Bookmarked: 26   Downloaded: 2,673
Describes how to create a control that inherits from a base control
Posted: 3 Jan 2012   Updated: 3 Jan 2012   Views: 18,460   Rating: 5.00/5    Votes: 10   Popularity: 5.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 16   Downloaded: 371
An enumeration RadioButtion ListBox control.
Posted: 18 Jun 2012   Updated: 18 Jun 2012   Views: 23,200   Rating: 5.00/5    Votes: 10   Popularity: 5.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 17   Downloaded: 214
A generic implementation for IValueConverter.
Posted: 21 Nov 2015   Updated: 21 Nov 2015   Views: 8,160   Rating: 5.00/5    Votes: 8   Popularity: 4.52
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 183
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: 6,430   Rating: 5.00/5    Votes: 10   Popularity: 5.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 11   Downloaded: 162
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: 14,270   Rating: 5.00/5    Votes: 11   Popularity: 5.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 912
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: 20,790   Rating: 4.83/5    Votes: 14   Popularity: 5.53
Licence: The Code Project Open License (CPOL)      Bookmarked: 18   Downloaded: 419
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: 8,270   Rating: 5.00/5    Votes: 8   Popularity: 4.52
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 264
This article presents a simple bar graph using an ItemsControl with a custom DataTemplate
Posted: 2 May 2016   Updated: 2 May 2016   Views: 37,360   Rating: 4.89/5    Votes: 10   Popularity: 4.89
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 1,845
Presents code to display bindable HTML text in a WPF RichTextBox or a WebBrowser.
Posted: 5 May 2016   Updated: 5 May 2016   Views: 11,660   Rating: 5.00/5    Votes: 10   Popularity: 5.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 11   Downloaded: 145
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: 14,051   Rating: 4.87/5    Votes: 10   Popularity: 4.87
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 526
This presents as control inherited from the Shape control for displaying an outline font.
Posted: 22 Jun 2016   Updated: 22 Jun 2016   Views: 9,310   Rating: 4.88/5    Votes: 11   Popularity: 5.08
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 197
Format converter to handle more cases than the StringFormat, including infinity, and NaN
Posted: 19 Aug 2016   Updated: 19 Aug 2016   Views: 29,491   Rating: 4.96/5    Votes: 21   Popularity: 6.55
Licence: The Code Project Open License (CPOL)      Bookmarked: 21   Downloaded: 1,832
This is an alternative for "A WPF Custom Control for Zooming and Panning"
Posted: 21 Sep 2016   Updated: 21 Sep 2016   Views: 7,590   Rating: 4.95/5    Votes: 8   Popularity: 4.47
Licence: The Code Project Open License (CPOL)      Bookmarked: 15   Downloaded: 201
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: 8,350   Rating: 5.00/5    Votes: 7   Popularity: 4.23
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 78
This is an alternative for "How to Embed Arbitrary Content in a WPF Control"
Posted: 29 Aug 2017   Updated: 29 Aug 2017   Views: 9,740   Rating: 4.90/5    Votes: 9   Popularity: 4.68
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 150
There are times when want to have associated RadioButton controls on a window, and it would be much easier to interface to these controls with a single property instead of independent properties for each RadioButton. This control allows multiple RadioButton controls to be on a single Binding.
Posted: 14 Sep 2017   Updated: 14 Sep 2017   Views: 6,800   Rating: 4.76/5    Votes: 16   Popularity: 5.73
Licence: The Code Project Open License (CPOL)      Bookmarked: 15   Downloaded: 156
A custom control that adapts to the datatype of the source.
Posted: 2 Oct 2017   Updated: 2 Oct 2017   Views: 4,740   Rating: 4.53/5    Votes: 8   Popularity: 4.06
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 75
This is a control that is like a Expander Control but there is both Expanded and not Expanded Content. It demonstrates some concepts on how to easily create controls whose functionality can be mostly implemented in the XAML with the code behind being mostly DependencyProperty definitions.
Data Binding
Posted: 2 Nov 2011   Updated: 2 Nov 2011   Views: 36,280   Rating: 4.92/5    Votes: 14   Popularity: 5.64
Licence: The Code Project Open License (CPOL)      Bookmarked: 15   Downloaded: 510
How to do dynamic binding of static properties.
Posted: 13 Sep 2015   Updated: 13 Sep 2015   Views: 14,150   Rating: 4.92/5    Votes: 14   Popularity: 5.64
Licence: The Code Project Open License (CPOL)      Bookmarked: 17   Downloaded: 337
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: 16,482   Rating: 5.00/5    Votes: 8   Popularity: 4.52
Licence: The Code Project Open License (CPOL)      Bookmarked: 17   Downloaded: 419
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: 11,180   Rating: 4.06/5    Votes: 11   Popularity: 4.17
Licence: The Code Project Open License (CPOL)      Bookmarked: 12   Downloaded: 60
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: 15,320   Rating: 5.00/5    Votes: 6   Popularity: 3.89
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 173
A special class is needed to support binding a set of flags to a View.
Posted: 5 Oct 2011   Updated: 5 Oct 2011   Views: 29,020   Rating: 3.82/5    Votes: 11   Popularity: 3.98
Licence: The Code Project Open License (CPOL)      Bookmarked: 24   Downloaded: 451
WPF Dynamic Application Settings
Posted: 14 Dec 2011   Updated: 14 Dec 2011   Views: 24,690   Rating: 4.65/5    Votes: 10   Popularity: 4.65
Licence: The Code Project Open License (CPOL)      Bookmarked: 14   Downloaded: 210
Discovering the limitations of IValueConverter in WPF
Posted: 20 Aug 2012   Updated: 20 Aug 2012   Views: 42,220   Rating: 4.90/5    Votes: 13   Popularity: 5.46
Licence: The Code Project Open License (CPOL)      Bookmarked: 19   Downloaded: 578
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: 11,660   Rating: 4.93/5    Votes: 10   Popularity: 4.93
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 152
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: 6,610   Rating: 5.00/5    Votes: 7   Popularity: 4.23
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 195
Presents a concept for creating a masked TextBox, and has the implementation for entering a TimeSpan
Posted: 5 Dec 2016   Updated: 5 Dec 2016   Views: 10,900   Rating: 4.70/5    Votes: 10   Popularity: 4.68
Licence: The Code Project Open License (CPOL)      Bookmarked: 11   Downloaded: 444
This is an alternative for "WPF Loading Wait Adorner"
Posted: 1 Mar 2017   Updated: 1 Mar 2017   Views: 25,550   Rating: 5.00/5    Votes: 16   Popularity: 6.02
Licence: The Code Project Open License (CPOL)      Bookmarked: 20   Downloaded: 1,962
This is a more comprehensive example of how to implement a project with MVVMLight
Libraries
Posted: 24 Nov 2011   Updated: 24 Nov 2011   Views: 28,280   Rating: 5.00/5    Votes: 9   Popularity: 4.77
Licence: The Code Project Open License (CPOL)      Bookmarked: 20   Downloaded: 286
A generic WPF/Silverlight value converter.
Posted: 26 Jan 2012   Updated: 26 Jan 2012   Views: 32,860   Rating: 4.53/5    Votes: 10   Popularity: 4.53
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 179
A value binding converter for WPF.
Algorithms & Recipes
Math
Posted: 12 Sep 2012   Updated: 14 Sep 2012   Views: 25,750   Rating: 4.67/5    Votes: 12   Popularity: 4.86
Licence: The Code Project Open License (CPOL)      Bookmarked: 19   Downloaded: 0
This is an alternative for "Finding prime numbers".
Threads, Processes & IPC
General
Posted: 23 Aug 2017   Updated: 23 Aug 2017   Views: 8,110   Rating: 4.97/5    Votes: 17   Popularity: 6.11
Licence: The Code Project Open License (CPOL)      Bookmarked: 24   Downloaded: 190
This is a generic class that makes it much easier to create another class in the background. It also provides a good sample of how to use the Task.Run with the ContinueWith clause.
Usability
General
Posted: 8 Jun 2017   Updated: 8 Jun 2017   Views: 5,420   Rating: 4.62/5    Votes: 10   Popularity: 4.62
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 81
The DatePicker, in my mind, is a partial fix to many of the problems with a simple TextBox date entry. How would you like to be able to type “66” in a text box that takes a date and have it interpret it as “June 6th”? Or enter “FR” and have it interpreted as the previous Friday. Or enter “thanks” an
No blogs have been submitted.

Average tips rating: 4.79

Button Controls
General
Posted: 2 Apr 2018   Updated: 2 Apr 2018   Views: 5,250   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 47
This tip provides a behavior that will reset all RadioButton controls within a Control that has this behavior when the Visibility changes.
Posted: 3 Apr 2018   Updated: 3 Apr 2018   Views: 8,640   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 152
Normally a popup will stay open until explicitly closed. The Behavior will close the Popup if the mouse is clicked within or outside the Popup area or leaves the Popup area.
Posted: 4 Apr 2018   Updated: 4 Apr 2018   Views: 5,150   Rating: 5.00/5    Votes: 9   Popularity: 4.77
Licence: The Code Project Open License (CPOL)      Bookmarked: 11   Downloaded: 85
This behavior will require that for any Group of ToggleButton/Checkbox controls that are associated together, the user cannot set all to not IsChecked.
Posted: 5 Apr 2018   Updated: 5 Apr 2018   Views: 6,230   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 0
Normally, there is no need to ensure that types exactly match when using a Binding. For instance, the Control property double to and int in a ViewModel
Posted: 20 Jun 2018   Updated: 20 Jun 2018   Views: 7,660   Rating: 5.00/5    Votes: 4   Popularity: 3.01
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 114
This behavior will select the entire text when a TextBox or PasswordBox gains focus
Non-rectangular Buttons
Posted: 19 Mar 2018   Updated: 19 Mar 2018   Views: 15,831   Rating: 4.41/5    Votes: 11   Popularity: 4.57
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 449
A alternative ToggleButton/RadioButton control
Edit Controls
General
Posted: 9 Aug 2015   Updated: 9 Aug 2015   Views: 7,900   Rating: 5.00/5    Votes: 6   Popularity: 3.89
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   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.
Posted: 18 Apr 2018   Updated: 18 Apr 2018   Views: 5,090   Rating: 5.00/5    Votes: 6   Popularity: 3.89
Licence: The Code Project Open License (CPOL)      Bookmarked: 12   Downloaded: 69
I had a situation where a control appearing was significantly affected by the initialization of the UserControls. This behavior fixed my problem.
Grid & Data Controls
DataSets, DataGrids etc
Posted: 15 Aug 2012   Updated: 2 Oct 2012   Views: 12,560   Rating: 5.00/5    Votes: 8   Popularity: 4.52
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 152
This article presents a way to display totally dynamic data in a windows grid using a dictionary.
General
Posted: 27 Apr 2018   Updated: 27 Apr 2018   Views: 4,690   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 58
This is a behavior that that will reset ToggleButton derived controls to false (or a specified default value) when the container's visibility becomes false.
List Controls
List Controls
Posted: 3 Mar 2019   Updated: 3 Mar 2019   Views: 4,120   Rating: 5.00/5    Votes: 7   Popularity: 4.23
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 72
This tip presents a behavior that will allow buttons to control the items in a WPF Selector (or ListBox) control.
Miscellaneous
Custom Controls
Posted: 3 Mar 2018   Updated: 3 Mar 2018   Views: 4,720   Rating: 4.53/5    Votes: 6   Popularity: 3.52
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 90
This tip presents a way to use the ContentControl and DataTemplate to easily control an image in a Window.
Posted: 2 May 2018   Updated: 2 May 2018   Views: 7,210   Rating: 5.00/5    Votes: 4   Popularity: 3.01
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 54
The tip provides a behavior that will set a control to a default value when the Visibility changes
Posted: 25 Jun 2018   Updated: 25 Jun 2018   Views: 5,890   Rating: 5.00/5    Votes: 7   Popularity: 4.23
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 166
A way to create a custom derived control with the XAML file attached like a UserControl
Design
Posted: 27 Jun 2018   Updated: 27 Jun 2018   Views: 3,630   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 0
These are some methods I created to help with creating and deleting Windows shared directories.
General
Posted: 4 Mar 2018   Updated: 4 Mar 2018   Views: 4,280   Rating: 4.53/5    Votes: 7   Popularity: 3.80
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 43
Provides a way to have a string in XAML that can contain string values and references to resources that are inserting into the string like string interpolation
Posted: 25 May 2018   Updated: 25 May 2018   Views: 4,790   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 0
VBA Code that will take a string and attempt to pull out the company name, street address, city, state, zip code, phone number, and web address
Posted: 13 Jun 2018   Updated: 13 Jun 2018   Views: 3,230   Rating: 4.93/5    Votes: 8   Popularity: 4.43
Licence: The Code Project Open License (CPOL)      Bookmarked: 11   Downloaded: 0
This is a set of methods to help in working with Services on the local machine.
Database
Databases
Posted: 7 Sep 2018   Updated: 7 Sep 2018   Views: 6,040   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 403
This is a tip that has the code for selecting an Excel file and sheet for import into Microsoft Access. This includes the code required to browse for a file, and populate a ListBox with the sheets of the Excel Workbook, and the code to import an Excel spreadsheet.
Posted: 12 Sep 2018   Updated: 12 Sep 2018   Views: 2,840   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 49
Method to change source of a Form’s Subform source to a Query or Table in Microsoft Access
C#
COM Interop
Posted: 26 Aug 2016   Updated: 26 Aug 2016   Views: 8,750   Rating: 4.75/5    Votes: 10   Popularity: 4.73
Licence: The Code Project Open License (CPOL)      Bookmarked: 11   Downloaded: 111
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: 10,540   Rating: 4.08/5    Votes: 11   Popularity: 4.21
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 0
I have used a Func to set the value of a property.
General
Posted: 8 Jun 2012   Updated: 8 Jun 2012   Views: 12,580   Rating: 5.00/5    Votes: 9   Popularity: 4.77
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 255
You can implement BackgroundWorker using Lambdas without any sort of helper class very easily.
Posted: 25 Mar 2013   Updated: 25 Mar 2013   Views: 9,190   Rating: 4.25/5    Votes: 8   Popularity: 3.84
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 61
Design to create a simple tree view that can be copy and pasted
Posted: 11 Jul 2013   Updated: 11 Jul 2013   Views: 13,040   Rating: 3.86/5    Votes: 8   Popularity: 3.48
Licence: The Code Project Open License (CPOL)      Bookmarked: 12   Downloaded: 107
Helper for serializing objects to a string
Posted: 25 Jul 2013   Updated: 30 Jul 2013   Views: 47,610   Rating: 4.59/5    Votes: 35   Popularity: 6.85
Licence: The Code Project Open License (CPOL)      Bookmarked: 50   Downloaded: 613
Helper for serializing objects in XML or binary and saving to a file
Posted: 15 Mar 2016   Updated: 15 Mar 2016   Views: 11,420   Rating: 4.40/5    Votes: 12   Popularity: 4.70
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 9
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: 29,390   Rating: 5.00/5    Votes: 4   Popularity: 3.01
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   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: 22,260   Rating: 5.00/5    Votes: 8   Popularity: 4.52
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 367
A little trick that will more completely fill the DatePicker background from the code-behind.
Posted: 26 Aug 2015   Updated: 26 Aug 2015   Views: 6,800   Rating: 4.86/5    Votes: 6   Popularity: 3.77
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   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: 8,000   Rating: 4.78/5    Votes: 5   Popularity: 3.32
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 91
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: 6,250   Rating: 4.18/5    Votes: 7   Popularity: 3.46
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 72
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: 9,800   Rating: 5.00/5    Votes: 4   Popularity: 3.01
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 146
WPF popup enumerated button control
Posted: 6 Aug 2016   Updated: 6 Aug 2016   Views: 6,040   Rating: 4.85/5    Votes: 12   Popularity: 5.23
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 55
This tip presents a way to have disabled items in your ComboBox
Posted: 5 Oct 2016   Updated: 5 Oct 2016   Views: 23,060   Rating: 4.91/5    Votes: 11   Popularity: 4.69
Licence: The Code Project Open License (CPOL)      Bookmarked: 11   Downloaded: 783
Presents and implementation of a control that can be pressed to bring up a Menu.
Posted: 28 Nov 2016   Updated: 28 Nov 2016   Views: 11,720   Rating: 5.00/5    Votes: 8   Popularity: 4.52
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 570
The WPF WebBrower control leaves a lot to be desired.
Posted: 5 Jan 2017   Updated: 5 Jan 2017   Views: 7,660   Rating: 5.00/5    Votes: 7   Popularity: 4.23
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 318
This is a simple popup that includes drag capability. The code should be helpful to anyone looking to create a control drag capability.
Posted: 7 Feb 2017   Updated: 7 Feb 2017   Views: 10,040   Rating: 5.00/5    Votes: 7   Popularity: 4.23
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 378
This tip presents a control that is derived from the ItemsControl that uses a UniformGrid to display.
Posted: 16 Aug 2017   Updated: 16 Aug 2017   Views: 5,290   Rating: 5.00/5    Votes: 9   Popularity: 4.77
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 135
This is a simple behavior that can be attached to a ContentControl and allows zooming and dragging the Content.
Posted: 2 Sep 2017   Updated: 2 Sep 2017   Views: 5,330   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 60
Presents a very simple control with an IsChecked property that allows definition of two different contents depending of if IsChecked property value is true or false
Posted: 26 Sep 2017   Updated: 26 Sep 2017   Views: 8,700   Rating: 4.74/5    Votes: 11   Popularity: 4.92
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 199
A behavior that allows the developer to bind an IList to SelectedItems of a ListBox or MultiSelector.
Posted: 11 Oct 2017   Updated: 11 Oct 2017   Views: 20,460   Rating: 5.00/5    Votes: 11   Popularity: 5.21
Licence: The Code Project Open License (CPOL)      Bookmarked: 17   Downloaded: 1,269
This tip presents a way to display checkboxes for selection of ListBox Items instead of the default highlighting
Posted: 12 Oct 2017   Updated: 12 Oct 2017   Views: 5,620   Rating: 4.79/5    Votes: 8   Popularity: 4.31
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 70
A Behavior is presented that will ensure that only one Checkbox will be checked within the visual tree of the control to which this behavior is attached
Posted: 17 Oct 2017   Updated: 17 Oct 2017   Views: 6,520   Rating: 5.00/5    Votes: 6   Popularity: 3.89
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 106
A Behavior is presented that will ensure that only one CheckBox (ToggleButton) will be checked with the same GroupName within the visual tree of the control to which this behavior is attached.
Posted: 3 Nov 2017   Updated: 3 Nov 2017   Views: 8,530   Rating: 4.94/5    Votes: 8   Popularity: 4.46
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 126
This tip shows how easy it is to create a Style with DependencyProperty definitions and avoid the much heavier UserControl
Posted: 1 Apr 2018   Updated: 1 Apr 2018   Views: 4,030   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 43
This is a control that is like a Expander Control but there is both Expanded and not Expanded Content. It demonstrates some concepts on how to easily create controls whose functionality can be mostly implemented in the XAML with the code behind being mostly DependencyProperty definitions.
Data Binding
Posted: 5 Sep 2012   Updated: 5 Sep 2012   Views: 20,950   Rating: 4.57/5    Votes: 7   Popularity: 3.86
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 414
The IValueConverter can be used to select a View.
Posted: 21 Nov 2015   Updated: 21 Nov 2015   Views: 6,520   Rating: 5.00/5    Votes: 4   Popularity: 3.01
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   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: 8,340   Rating: 4.38/5    Votes: 5   Popularity: 3.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 69
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: 8,870   Rating: 5.00/5    Votes: 7   Popularity: 4.23
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 43
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: 7,960   Rating: 4.38/5    Votes: 8   Popularity: 3.95
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 84
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: 13,670   Rating: 4.92/5    Votes: 8   Popularity: 4.44
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 170
This class based on the ObservableCollection supports updating instead of replacing
Posted: 2 Aug 2017   Updated: 2 Aug 2017   Views: 7,470   Rating: 5.00/5    Votes: 7   Popularity: 4.23
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 216
Fairly straight forward way of binding in a HierarchicalDataTemplate or DataTemplate to the parent ViewModel when using the TreeView control.
Posted: 11 Aug 2017   Updated: 11 Aug 2017   Views: 6,770   Rating: 4.75/5    Votes: 6   Popularity: 3.67
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 82
Sometimes want to have some action in a View when there are no items or are items in a collection. It is very easy to do this with a converter and binding to the Collection's Count property
Posted: 9 Apr 2018   Updated: 9 Apr 2018   Views: 11,640   Rating: 4.50/5    Votes: 6   Popularity: 3.48
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 217
Shows how to set DataContext of View to itself using XAML and discusses the advantages of INotifyPropertyChanged to DependencyProperty
General
Posted: 10 Oct 2016   Updated: 10 Oct 2016   Views: 9,830   Rating: 3.82/5    Votes: 7   Popularity: 3.22
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 67
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: 12,040   Rating: 5.00/5    Votes: 4   Popularity: 3.01
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   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: 19,160   Rating: 5.00/5    Votes: 10   Popularity: 5.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 17   Downloaded: 652
Presents a behavior to prevent entry of anything but digits into a control
Algorithms & Recipes
Algorithms
Posted: 17 May 2018   Updated: 17 May 2018   Views: 6,730   Rating: 3.70/5    Votes: 8   Popularity: 3.09
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 76
This tip provides examples of how to use the different arguments of the Linq GroupBy extension method.
Collections
General
Posted: 2 Jul 2012   Updated: 2 Jul 2012   Views: 46,380   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 11   Downloaded: 423
Why didn’t Microsoft provide this in the ObservableCollection?
No reference articles have been posted.
No projects 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.