Ever needed to find out whether all the characters in a string are numbers, so they can be converted to an int or validated for example? There are a couple of ways this can be achieved. Perhaps the most obvious way is something like this Or you can do it the way I prefer if
If you have used Twitter Bootstrap before you will probably know that it has a Navbar component so you can easily build navigation for a website. One of the features of the Navbar is being able to set which of the links within it is the currently active one, so this can displayed to the user. As
For a project at work we needed the ability for the user to use the tab button on an Infragistics XamDataGrid to submit the record they are adding and set the focus back to the first cell of the data grid. For whatever reason this is not a built in method (have they not tried
When using the new Entity Framework migration features where your DbContext is not in the start up project for the solution you need to explicitly tell the Update-Database command which project to use to get the connection string information from. This can be done by passing a parameter to Update-Database called “StartupProjectName”, so the full command to
Want to have default text shown when no item is selected in a combo box, such as “Please Select”? This can easily be achieved using a binding converter such as: Then in your XAML it can be used like this:
I needed to show some text when a ListBox was empty, a quick Google turned up a StackOverflow question that was just the ticket!
I needed to find out the standard .NET colour name for for a Color object, assuming the Color object was a standard .NET colour! As there is no built in way of doing this I created a simple helper class, the code is below.
I asked a question on StackOverflow about using the Infragistics XamDockManger with Caliburn.Micro, Marco Amendola came up with several ways to do it and I chose to implement my own docking manager. If you want to skip my ramblings you can find the code on bitbucket or as an attachment to this post. You will
Ever needed to unit test .NETs System.Configuration.ConfigurationManager class? I had to today so produced a wrapper class and interface to make the task a bit easier.
- How to find if all characters in a string are a number
- Setting the active link in a Twitter Bootstrap Navbar in ASP.NET MVC
- XamDockManager – Setting keyboard focus back to the add row
- Entity Framework 4.3 – Adding Migrations from AppConfig in different project
- XamComboEditor / ComboEditorTool Setting Default Text