Category Archives: Programming

WPF Style BasedOn Is Not Inheritance

Notice that in the example below the SuperStyle which is based on StartingStyle does not automatically know the TargetType, and is complaining about access to the TextTrimming property. If the TargetType of TextBlock is repeated in the SuperStyle declaration, the error goes away.

XAML Editor

By retrieving the SuperStyle from the window’s resources we find that the TargetType is System.Windows.IFrameworkInputElement

MessageBox of TargetType.FullName

and not System.Windows.Controls.TextBlock. So be sure to indicate the TargetType even when using BasedOn to compose a style.

Spring.Core IoC

I just posted an article on the .NET link about using the Spring.NET core IoC technology to instantiate an application object that contains a list of other objects, and initialize them both using XML. The IoC container takes care of everything. For more info on Spring, check out the Spring.NET application framework site.

.NET Programming

I’ve just added a new tab to contain articles that I write about .NET programming. I’ve started off with a review of creating an ODBC data source for a Windows Forms application, for those times when the database vendor has no other way of connection. Check it out if you are interested.