Archives

Currently Reading

Interesting TimesSoul MusicMen at ArmsLords and LadiesWitches AbroadReaper Man

More of Sytone's books »
Book recommendations, book reviews, quotes, book clubs, book trivia, book lists

WPF Converter: CaseConverter

Case Converter was made when I wanted the text to display in a WPF UI in upper case. Probably not the best class name, but anyway. To get the code and install read on.

Continue reading WPF Converter: CaseConverter

Getting the Central Admin URL for a Farm in SharePoint

I recently needed to get the Url of the CA for a SharePoint farm, after a bit of hunting in the API it was tracked down under the SPAdministrationWebApplication object.

C# SPAdministrationWebApplication caWebApp = Microsoft.SharePoint.Administration.SPAdministrationWebApplication.Local; var url = caWebApp.Sites[0].Url; PowerShell $caWebApp = [Microsoft.SharePoint.Administration.SPAdministrationWebApplication]::Local [...]

When is true not true?

When you look at true stored in the .Net framework.

While playing with Pex I found out a interesting fact that the bool is a byte in the MSIL. Which means that a bool could be euqal to anything on the byte range… Now this would require you to go out of your [...]

Getting a MailItem from a Ribbon Event

You may find this code block handy:

/// /// Gets the mail item selected in the explorer view if one is selected or instance if that is the view active. /// /// The instance containing the event data. /// A Outlook.MailItem for the mail being viewed. private Outlook.MailItem GetMailItem(RibbonControlEventArgs e) { // Check to [...]