I made the mistake of using the SelectionChange event on a textbox while implementing some filtering on a DataGrid. What happened, when using SelectionChanged, was that each time the textbox received focus I was executing the filter. Even initially when there was nothing to filter. My logic was checking if the contents of the textbox […]
Read More →Category: C# Blogs
Using ODP.Net with NHibernate and System.Decimal
A few months ago I wrote a question asking for solutions to this error. There were some good answers but none of them provided me with a work around that was database independent. At least something that would work with both Oracle and SQL Server. I was implementing some calculated fields in NHibernate and I […]
Read More →How to add a watermark to a textbox using WPF
Some time ago I had to implement a search box which filtered a result set in a DataGrid. It was a pretty straight forward exercise. However, it took some time to find a good example and change it into what I needed. Basically, what needs to be done is to add a TextBlock and a […]
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 wasy 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 →WPF DataGrid rendering is very slow
I was developing a WPF application that contained a DataGrid like so many times in the past. However, this time it was taking 20-30 seconds for the DataGrid to render. I checked the query execution speed. I was building the DataTable dynamically, but I checked the speed of that too and it was fast as […]
Read More →NHibernate could not execute query[SQL: SQL not available] in C#
I was writing some new code that would use NHibernate a few days back and while I was testing it I received thie error: Could not execute query[SQL: SQL not available] The value xxx is not of type xxx.xxx.xxx and cannot be used in this generic collection. Parameter name: value de-DE: xxx ist kein Wert […]
Read More →Disable navigation buttons and navigation history within a WPF Navigation Page program
The Navigation functionality of WPF is pretty cool. It lets the developer create a wizard like program which walks the user through a number of consecutive steps from start to finish. All of which happens within a single window, similar to a web browser, but it’s a desktop program. When implementing the WPF Navigation program […]
Read More →Expand first level of treeview item or node using WPF
If you recall in a previous article I created a treeview class with checkboxes here. I expanded on that later to include images here. I realized that I had set the IsExpanded property of the treeview within a setter for my treeview resources with a value of True. This meant that all nodes within the […]
Read More →NHibernate could not execute query, ORA-00904 invalid identifier
This is a pretty easy one to solve. This happens because the column attribute in the mapping file does not exist on the database being accessed. <property name=”SpelledWrong” column=”SPELLDWRONG” type=”string” /> More than likely there is a spelling mistake or the column doesn’t exist on the table being mapped.
Read More →My Windows 8 Store App – Hitman Website Monitor
I am migrating all my articles to this site. I wrote this one long ago and posting here for historical reasons. I hope you enjoy it. After creating my Windows Phone application I wanted to test out how difficult or easy it would be to port that to a Windows 8 Store App. After some […]
Read More →