Controlling Message Flow to a Service Host

Assume that you want to limit the rate at which the service host reads messages from a queue. And, when the system is “under stress” you want to stop further message consumption. Read more…


Mouse Over Trigger for TreeViewItem

The problem with the IsMouseOver property on TreeViewItem in WPF is that when it is set to true for a child node it is also true for parent nodes. Therefore if you try to add a trigger with IsMouseOver property you will observe the following behavior: Code Snippet <TreeView x:Name=”TreeViewControl” ItemsSource=”{Binding}”>     <TreeView.Resources>         <HierarchicalDataTemplate…


Setting TreeView SelectedItem in Code

It is possible to set the selected item of a TreeView control in WPF without direct interaction with UI elements by including IsSelected property in your data object and binding it to IsSelected property of TreeViewItem. The code snippets below indicate how to set expanded and selected items of a TreeView control by updating the…


Office-like WPF Tooltip for Hyperlinks

You can have Office-like tooltips for the hyperlinks displayed in RichTextBox control in WPF. First thing to note is enabling the hyperlinks in RichTextBox by setting IsDocumentEnabled property. Then, we will bind the ToolTip property of the hyperlink to its NavigateUri property to be able to use it in the new DataTemplate of the ToolTip….


Troubleshooting Outlook Add-ins

If you have trouble loading your Outlook add-in, first make sure it is listed in the trust center. To do this open the dialog Tools->Trust Center->Add-ins.   If your add-in is listed under “Inactive Application Add-ins” this means it could not be loaded and in fact if you select COM Add-ins to display COM Add-ins…