I would like to proudly announce the release and availability of my new Beginning C# and .NET 2021 Edition book, which was co-authored with Jon Reid. The book contains over 800 pages of material relating to the skills and knowledge required to become a great C# programmer. The book is designed around the premise that […]
Read More →Tags: WPF
Adding a context menu to a treeview Part 2
In my previous post I showed you how I added a context menu to a treeview. I had a new requirement that wanted a treeview property to contain a flag that could be turned on or off and that the value be displayed in the context menu. First I added the menuItem to the XAML. […]
Read More →Adding images to a Tree View in WPF using C#
Like I’ve said before, once you find what your looking for, it is easy to find examples about how to use and implement it. I had this again while trying to add images to a treeview. The term I was looking for, while trying to find a solution was ValueConverter. In this solution I will […]
Read More →Treeview with checkbox in WPF
On one of my projects I had to provide treeview selection functionality. I searched the internet and pulled everything I could into a this single resource. I wasn’t able to find 1 post that provided all the details and source code to do what I needed. Now there is one and if you find it, […]
Read More →How to get a treeview item node value using a ContextMenu using WPF and C#
The first things you need to note is that the treeview node needs to be selected in order for you to get any information from it. I did read some articles about using the System.Windows.Point to get the X, Y coordinates of the mouse, but I chose to go another route. Using the Point class […]
Read More →WPF DataGrid Navigation Paging Up Down Sideways is slow virtualization
I was developing a WPF application that allowed users to selected as many rows and as many columns that were available in the database. I dynamically built the selection criteria using reflection and a treeview. Then I traversed the treeview and dynamically built the DataGrid that contained the columns and thier values. What I quickly […]
Read More →How do Margins in WPF work
When you add a control to your WPF container you typcally set the width and height to align it within the window and in relation to other controls. An alternative to this is to set the controls margin in relation to the container. This plays an important role when you want to add GridSplitters and […]
Read More →How to set the minimum and maximum width or height of a column or row using WPF
The more I use WPF (Window Presentation Foundation) the more I like it and the more I see the similarity with coding HTML pages or ASP.NET pages. Microsoft has really done a good job at separating the presentation logic from the business logic with WPF. It is much more difficult to do in Windows Forms. […]
Read More →WPF Using Templates and Themes
If you are like me, your getting a little tired of the tannish green or grey color of the default WPF window. I have been seeing in magazines and on the internet some nice looking GUI’s (graphical user interface or windows) and was thinking about how I could implement or develop something like that. I […]
Read More →Localizing a WPF program using C#
See also the article about localizing an ASP.NET system here. See also my video about localizing an ASP.NET system here. These days when you are designing a GUI (Graphical User Interface) one of the many topics to discuss is that of localization. Simply, localization means that local date format, currency and language will be supported […]
Read More →