August 2009 Entries
Source Code I’m working on a Silverlight scheduling application and wanted to make the DatePicker control from the Silverlight Toolkit look like the program icon on my iPod Touch. The calendar looks icon like a day calendar and dynamically displays the current date. I got the idea when I was looking at the calendar icon on the right-hand side of the DatePicker control. It was actually one of those accidental ideas. The control’s icon looks like a day calendar and displays the number ‘15’ – well the day I was looking at it happened to...
Sometimes instead of binding to a property of the current DataContext you want to bind to the actual DataContext itself. For example, I am using DelegateCommand<T> from Composite Application Library and needed to bind a command to perform an action on the current item in a ListBox. <UserControl x:Name="ViewRoot">
<ListBox ItemSource="{Binding Path=MyCollection}">
<Button Content="Delete" cmd:Click.Command="{Binding ElementName=ViewRoot, Path=DataContext.Delete}
cmd:Click.CommandParameter={??????}...
Last night I was talking with my wife about my day. Without sounding too gushy, I really appreciate that she is interested in listening to me talk about technical details (as long as she doesn’t have one of our 3 little shadows following her around). We’ll often end up on a long, detailed tangent because she doesn’t just nod and smile, she asks me questions to understand more of what I’m talking about. I not saying this to brag (maybe just a little), but rather because I have no idea how we got to talking about Ad Blockers....
Let me start by saying I have no qualms against using var to declare variables. I use it myself when it suits me. I find the best situations to take advantage of it are: When using anonymous types When declaring variables which are instances of an interface The first case is really not optional. You can’t declare an anonymous type without var. The second, should be used carefully because it can impede readability if used incorrectly. Since you cannot initialize an interface the right side of your declaration might...
I’m really liking Subtext, so far I’m not regretting my choice to use it as my blog engine. It has been pretty simple to setup and there has been plenty of support from the community in the form of blog posts describing everything I’ve needed. The most enjoyable part of it all was when Subtext didn’t support what I needed it was very easy to add what I needed. Setting up Subtext You can download the deployment files or get the source code here. To deploy, you’ll need to get the database connection string setup correctly...