<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.infragistics.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Andrew Smith</title><link>http://blogs.infragistics.com/blogs/andrew_smith/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>ItemsSource for XamDockManager Elements</title><link>http://blogs.infragistics.com/blogs/andrew_smith/archive/2010/01/12/itemssource-for-xamdockmanager-elements.aspx</link><pubDate>Tue, 12 Jan 2010 21:09:03 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:213062</guid><dc:creator>[Infragistics] Andrew Smith</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.infragistics.com/blogs/andrew_smith/rsscomments.aspx?PostID=213062</wfw:commentRss><comments>http://blogs.infragistics.com/blogs/andrew_smith/archive/2010/01/12/itemssource-for-xamdockmanager-elements.aspx#comments</comments><description>&lt;p&gt;A number of people have asked about binding the ItemsSource of a TabGroupPane to their collection. This is not supported by the TabGroupPane so I thought I would explain why and provide an alternative approach. If you’re looking to bind the DocumentContentHost or even a specific SplitPane to a collection, you should still read on as this solution will allow for that as well.&lt;/p&gt;  &lt;p&gt;The TabGroupPane is a derived ItemsControl and the ItemsSource property you see on the TabGroupPane is that of the base ItemsControl class. The ItemsControl is really designed so that whatever containers that are created for items in the ItemsSource are hosted within that ItemsControl – specifically hosted by the Panel indicated by the ItemsPanel property. So items are either automatically pushed into the Children of the ItemsPanel as items are added to the collection or in the case of a VirtualizingPanel, the panel has control over when/which containers are hydrated. Also, once you set the ItemsSource it is not possible to directly change its Items collection – an exception will be thrown by the ItemCollection if you do.&lt;/p&gt;  &lt;p&gt;If you think about the TabGroupPane, it needs to be able to manipulate the items it contains – i.e. its Items collection. This can happen for a number of reasons. For example, if the end user pins/unpins a pane, drags a pane into or out of the group, changes the docked/floating state of one of the children, etc. Since that wouldn’t be possible if the control’s items were provided by its ItemsSource (since the Items collection would not be modifiable), the control cannot support binding its Items collection via the ItemsSource.&lt;/p&gt;  &lt;p&gt;So how can provide support for this without using the ItemsSource property. If you think about it, the thing that we need is something analogous to the &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.itemcontainergenerator.aspx" target="_blank"&gt;ItemContainerGenerator&lt;/a&gt;. This is a class used by the ItemsControl and its associated ItemsPanel to generate containers/elements for items that are not of the desired type. So for a ListBox, ListBoxItem instances are generated for items that are not of that type. Unfortunately the ItemContainerGenerator is not publicly creatable.&lt;/p&gt;  &lt;p&gt;So the approach I decided to take was to create my own ItemContainerGenerator type class named ContainerFactoryBase that could be given a source collection and it would maintain an associated collection of containers. Based on the contents of the collection and as the collection raised change notifications it would invoke methods similar to those of the ItemsControl on itself that derived classes could use to create the appropriate container (e.g. IsItemItsOwnContainer and GetContainerForItem) and associate that container with the item (e.g. ApplyItemContainerStyle and PrepareContainerForItem). It would invoke methods as items in the source collection were added/removed/moved so that the derived class could take the appropriate action with the associated container.&lt;/p&gt;  &lt;p&gt;I then created a derived class named ContentPaneFactory that creates ContentPane instances as the container for each item and adds it to the associated target. The class exposes several path properties that can be used to bind properties of the ContentPane to properties of the data item including the Header, Content and TabHeader properties. For any other properties, you could either provide a Style for ContentPane using the ContainerStyle property or you could use the ItemBindings collection. Lastly, I also raise an attached event (InitializeContentPane) when a ContentPane is created so you could do any programmatic initialization that might be necessary.&lt;/p&gt;  &lt;p&gt;To make this easier to use I created an attached property that would be used to associate the factory with a given target. So you would set the ContentPaneFactory.PaneFactory property to a ContentPaneFactory instance on either a TabGroupPane, SplitPane or DocumentContentHost and that is the target element to which new ContentPane instances are added.&lt;/p&gt;  &lt;div style="font-family:monospace;"&gt;   &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igDock&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DocumentContentHost&lt;/span&gt;&amp;#160;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igExtensions&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ContentPaneFactory.PaneFactory&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#008000;"&gt;&amp;lt;!-- Binds to the Documents property of the DataContext. --&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igExtensions&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ContentPaneFactory&lt;/span&gt;&amp;#160;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt; ItemsSource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Documents&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;}&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt; HeaderPath&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Name&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt; ContentPath&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;.&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igExtensions&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ContentPaneFactory.PaneFactory&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igDock&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DocumentContentHost&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt;  &lt;p&gt;You can get the sample &lt;a href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/andrew_5F00_smith/DockManagerBindingSample.zip" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.infragistics.com/aggbug.aspx?PostID=213062" width="1" height="1"&gt;</description></item><item><title>Common Style Issues when using the Theme property</title><link>http://blogs.infragistics.com/blogs/andrew_smith/archive/2009/12/09/common-style-issues-when-using-the-theme-property.aspx</link><pubDate>Wed, 09 Dec 2009 22:42:34 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:208435</guid><dc:creator>[Infragistics] Andrew Smith</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.infragistics.com/blogs/andrew_smith/rsscomments.aspx?PostID=208435</wfw:commentRss><comments>http://blogs.infragistics.com/blogs/andrew_smith/archive/2009/12/09/common-style-issues-when-using-the-theme-property.aspx#comments</comments><description>&lt;h3&gt;Summary&lt;/h3&gt;  &lt;p&gt;There are a couple of Style related issues that I see often. The first is a case where you have set our Theme property but some of the elements do not appear to be following the look for that theme. The other is a case where you have created a Style for a given element but your Style is not being used. To determine what is happening it is helpful to understand how Styles are located/resolved by WPF. I’m going to assume that you have a basic understanding of defining and using Styles in WPF. If not, you may want to read through the &lt;a href="http://msdn.microsoft.com/en-us/library/ms745683(VS.85).aspx" target="_blank"&gt;Styling and Templating&lt;/a&gt; topic in Microsoft’s help first.&lt;/p&gt;  &lt;h3&gt;Background&lt;/h3&gt;  &lt;p&gt;In WPF, an element can be affected by up to 2 Style instances – the “local” style and the “theme” style. Note, the theme I am referring to here is the operating system theme (e.g. Aero, XP Blue, XP Silver, etc.) and not the Theme property that we expose on our controls. I’ll explain how our Theme property plays a role a little later.&lt;/p&gt;  &lt;p&gt;The theme style is the Style that WPF uses as the default style for the element. Without going into too much detail as it isn’t relevant to these issues, essentially the WPF framework loads a Style for a given element based on the value of its DefaultStyleKey, which is usually the element’s Type, and the current OS theme name. Essentially this is the Style provided by the developer of the control.&lt;/p&gt;  &lt;p&gt;The local style is the style provided by the application in which the element is being used. If the Style property of an element is set then that will be the local style. If the Style property is not set then WPF will attempt to locate an implicit style and use that as the local style. The implicit style is a resolution process that involves checking the Resources of the element and its ancestors for a Style where the key in the ResourceDictionary is the specific Type of the element. The first Style that is located is used as the local style. If one is not found then the Application’s Resources are checked, again using the specific Type of the element as the key used to locate the style in the dictionary. Note, when you define a Style in a ResourceDictionary in XAML, the TargetType is used as the key if you don’t explicitly specify the key.&lt;/p&gt;  &lt;p&gt;If a local style is found, the setters and triggers of that style will take precedence over those of the theme style. It is also important to note that if the OverridesDefaultStyle property is set (directly on the element or in the local style) then WPF will not apply the information from the theme style on the element instance.&lt;/p&gt;  &lt;p&gt;The Infragistics Theme property takes advantage of the implicit local style capability of WPF. When you set the Theme property on a control, the ThemeManager class loads a ResourceDictionary containing the resources defined for that Theme and places them into the MergedDictionaries of the Resources of that element.&lt;/p&gt;  &lt;p&gt;Now that we understand how WPF locates Styles and how the Theme property is involved we can try to understand why the original issues were occuring.&lt;/p&gt;  &lt;h3&gt;Problem 1 - Element Not Using Theme&lt;/h3&gt;  &lt;p&gt;The first problem I mentioned was that while the Theme property was set, the element does not use the look for that Theme. There are actually a couple of scenarios under which this commonly occurs.&lt;/p&gt;  &lt;h4&gt;Scenario 1&lt;/h4&gt;  &lt;p&gt;The first situation is one where the element that you are using is a derived instance of our class – perhaps to isolate the contents of that element. For example, you might have derived from RibbonTabItem so that you could define the RibbonGroups and Tools used by that tab in isolation as opposed to defining them all within the Window that will contain the xamRibbon. E.g.&lt;/p&gt;  &lt;div style="font-family:monospace;"&gt;   &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;RibbonTabItem&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Class&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;StyleIssues.DerivedNotUsingTheme.MyRibbonTabItem&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;igRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://infragistics.com/Ribbon&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;Header&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Home&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;RibbonGroup&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Caption&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Clipboard&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;...&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;RibbonGroup&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;RibbonTabItem&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt;  &lt;p&gt;And then use it within the ribbon by creating an instance of that derive tab.&lt;/p&gt;  &lt;div style="font-family:monospace;"&gt;   &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Window&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Class&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;StyleIssues.DerivedNotUsingTheme.TestWindow&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;local&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;clr-namespace:StyleIssues.DerivedNotUsingTheme&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;igRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://infragistics.com/Ribbon&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;Title&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;TestWindow&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Height&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;300&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Width&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;300&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StackPanel&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;XamRibbon&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Theme&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Office2k7Black&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;local&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;MyRibbonTabItem&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; /&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;RibbonTabItem&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Header&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Other&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;XamRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StackPanel&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Window&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt;  &lt;p&gt;What you will notice is that when you run the application, the tab will not appear correct when you hot track the mouse over the tab.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://users.infragistics.com/andrews/StyleresolutioninWPF_87CB/image.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://users.infragistics.com/andrews/StyleresolutioninWPF_87CB/image_thumb.png" width="191" height="73" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Recall that I mentioned that when WPF looks for the implicit local style that it will always use the actual Type of the class. Setting the Theme property puts a ResourceDictionary that contains amongst other things, a Style for the RibbonTabItem. However WPF is not looking for that Type; instead it is looking for a Style where the Key is MyRibbonTabItem in this case. There are a couple of ways to get around this problem. One would be to not create a derived class but instead just define the xaml without a backing class and use LoadComponent. I described this approach in a forum post &lt;a href="http://forums.infragistics.com/forums/p/18663/67777.aspx#67777" target="_blank"&gt;here&lt;/a&gt;. Another approach would be to set the Style property of your instance to a DynamicResource where the key is the base type. E.g. &lt;/p&gt;  &lt;div style="font-family:monospace;"&gt;   &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;RibbonTabItem&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Class&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;StyleIssues.DerivedNotUsingTheme.MyRibbonTabItem&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;igRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://infragistics.com/Ribbon&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;&amp;#160;&lt;strong&gt;Style&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DynamicResource&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; {&lt;/span&gt;&lt;span style="color:#a31515;"&gt;x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Type&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; igRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;RibbonTabItem&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;}}&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;Header&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Home&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;RibbonGroup&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Caption&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Clipboard&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#0000ff;"&gt;...&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;RibbonGroup&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igRibbon&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;RibbonTabItem&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt;  &lt;h4&gt;Scenario 2&lt;/h4&gt;  &lt;p&gt;Another case where this occurs is if you explicitly or implicitly set the Style of an element. One of the most common examples for this is providing an EditorStyle for a Field. E.g.&lt;/p&gt;  &lt;div style="font-family:monospace;"&gt;   &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Window&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Class&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;StyleIssues.SetStyle.TestWindow&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;igDP&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://infragistics.com/DataPresenter&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;igEditors&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://infragistics.com/Editors&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;sys&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;clr-namespace:System;assembly=mscorlib&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;Title&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;TestWindow&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Height&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;300&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Width&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;600&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Window.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igEditors&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ComboBoxItemsProvider&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;departments&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;sys&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;String&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Accounting&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;sys&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;String&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;sys&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;String&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Marketing&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;sys&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;String&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;sys&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;String&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Sales&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;sys&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;String&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;sys&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;String&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Admin&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;sys&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;String&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igEditors&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ComboBoxItemsProvider&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;comboStyle&amp;quot;&lt;/span&gt;&amp;#160;&lt;span style="color:#ff0000;"&gt;TargetType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;igEditors:XamComboEditor&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Setter&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Property&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ItemsProvider&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StaticResource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; departments&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;}&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Window.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Grid&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igDP&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;XamDataGrid&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Theme&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;LunaOlive&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; BindToSampleData&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;True&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igDP&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;XamDataGrid.FieldLayouts&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igDP&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;FieldLayout&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igDP&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Field&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;department&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igDP&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Field.Settings&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igDP&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;FieldSettings&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; EditorStyle&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StaticResource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; comboStyle&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;}&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igDP&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Field.Settings&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igDP&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Field&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igDP&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;FieldLayout&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igDP&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;XamDataGrid.FieldLayouts&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igDP&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;XamDataGrid&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Grid&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Window&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&lt;a href="http://users.infragistics.com/andrews/StyleresolutioninWPF_87CB/image_3.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://users.infragistics.com/andrews/StyleresolutioninWPF_87CB/image_thumb_3.png" width="220" height="39" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Recall that when WPF is locating the local style, it will first check the Style Property. If that is set then that will be the local style and it will not attempt to look for an implicit style. Since the implicit style will not be used, the Style provided for the element from the Theme will not be used. One way to workaround this is to set the Based on of your Style to the Style for the Theme you are using. E.g.&lt;/p&gt;  &lt;div style="font-family:monospace;"&gt;   &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;strong&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;igThemes&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://infragistics.com/Themes&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;Title&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;TestWindow&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Height&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;300&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Width&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;600&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Window.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;...&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;comboStyle&amp;quot;&lt;/span&gt;&amp;#160;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;TargetType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;igEditors:XamComboEditor&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;&amp;#160;&lt;strong&gt;BasedOn&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Static&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; igThemes&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;EditorsLunaNormal&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;.XamComboEditor}&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Setter&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Property&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ItemsProvider&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StaticResource&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; departments&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;}&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Window.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&lt;a href="http://users.infragistics.com/andrews/StyleresolutioninWPF_87CB/image_4.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://users.infragistics.com/andrews/StyleresolutioninWPF_87CB/image_thumb_4.png" width="244" height="32" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Note a similar issue would occur if instead of explicitly setting the Style property, you put a Style into the Resources of an element either in the target element itself or one of its ancestors between it and the element on which you set the Theme property. The workaround for this issue would be the same as the one described above – to set the BasedOn for the Style.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h3&gt;Problem 2 - Custom Style Not Used&lt;/h3&gt;  &lt;p&gt;The second problem I mentioned is a case where you have defined a Style for an element and that Style is not being picked up when the Theme property has been set. E.g.&lt;/p&gt;  &lt;div style="font-family:monospace;"&gt;   &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Window.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; TargetType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;igWindows:TabItemEx&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Setter&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Property&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;FontWeight&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Bold&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Window.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Grid&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;XamTabControl&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Theme&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Office2k7Black&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TabItemEx&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Header&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;One&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TabItemEx&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Header&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Two&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TabItemEx&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Header&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Three&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;XamTabControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Grid&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt;  &lt;p&gt;By now you can probably tell what the problem is. When you set the Theme property, Styles are put into the Resources of the control on which you set the Theme. WPF during its implicit Style search will encounter the Resource of that element (the xamTabControl in this case) first and will not continue and therefore would ignore any Style you might have placed into the the Window or Application Resources. The workaround is to move that Style into the Resources of the element on which you set the Theme. Note, since this Style will now be found first (since the ResourceDictionary provided by the Theme property is put into the Resources.MergedDictionaries and the MergedDictionaries are checked after the resources you place directly in the Resources) the Style provided by the Theme will not be used so you must also use the approach recommended in the second scenario for the first problem. E.g.&lt;/p&gt;  &lt;div style="font-family:monospace;"&gt;   &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;XamTabControl&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Theme&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Office2k7Black&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;strong&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;XamTabControl.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;strong&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; TargetType&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;igWindows:TabItemEx&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;strong&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:#ff0000;"&gt;BasedOn&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Static&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; igThemes&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;PrimitivesOffice2k7Black&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;.TabItemEx}&amp;quot;&amp;gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;strong&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Setter&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Property&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;FontWeight&amp;quot;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Bold&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;strong&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;strong&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;XamTabControl.Resources&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TabItemEx&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Header&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;One&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TabItemEx&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Header&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Two&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TabItemEx&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Header&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Three&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="text-indent:-4ex;margin-left:4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;XamTabControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.infragistics.com/aggbug.aspx?PostID=208435" width="1" height="1"&gt;</description></item><item><title>Hosting WPF Controls in a XamDataGrid Cell</title><link>http://blogs.infragistics.com/blogs/andrew_smith/archive/2009/03/27/hosting-wpf-controls-in-a-xamdatagrid-cell.aspx</link><pubDate>Fri, 27 Mar 2009 20:26:00 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:85221</guid><dc:creator>[Infragistics] Andrew Smith</dc:creator><slash:comments>10</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.infragistics.com/blogs/andrew_smith/rsscomments.aspx?PostID=85221</wfw:commentRss><comments>http://blogs.infragistics.com/blogs/andrew_smith/archive/2009/03/27/hosting-wpf-controls-in-a-xamdatagrid-cell.aspx#comments</comments><description>&lt;p&gt;By default, the elements used to display and edit values in a XamDataGrid cell are based on the ValueEditor associated with that Field. The EditorType and/or EditorStyle is used to determine which ValueEditor derived class (e.g. XamTextEditor, XamMaskedEditor, etc.) should be used. If those are not specified a default one is chosen based on the resolved EditAsType. &lt;/p&gt;
&lt;p&gt;One way to provide a control for a cell is to create a custom Template for the cell as part of the CellValuePresenterStyle on the FieldSettings. This works fine if you are just using this to render the value but it has limitations with regards to editing and tab navigation. Since ValueEditor is not being used the EditMode(Start|End)(ing|ed) events will not be raised. Also when the cell tries to go into edit mode, the controls within the cell will not automatically get focus and when you use the tab key to navigate, the grid will use that to navigate amongst the cells.&lt;/p&gt;
&lt;p&gt;The other option is to create a custom ValueEditor and use that as the editor for the Field. To help facilitate this I have created a sample ValueEditor named ControlHostEditor that can be used to host arbitrary controls/elements. The ControlHostEditor exposes 2 DataTemplate properties - RenderDataTemplate and EditDataTemplate - which are used based on whether the editor is in edit mode. You can get the &lt;a target="_blank" href="http://blogs.infragistics.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/andrew_5F00_smith/HostAnyControl.zip"&gt;sample here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update [8/25/09]&lt;/strong&gt;: I modified the sample to avoid using FindAncestor within the sample templates since&amp;nbsp;a FindAncestor&amp;nbsp;binding is not evaluated synchronously. Instead, there is now an inherited property that provides access to the editor in the descendant elements eliminating the need for the FindAncestor call.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://users.infragistics.com/andrews/HostingWPFControlsinaXamDataGridCell_9C7F/HostAnyControl.jpg"&gt;&lt;img height="102" width="644" src="http://users.infragistics.com/andrews/HostingWPFControlsinaXamDataGridCell_9C7F/HostAnyControl_thumb.jpg" alt="HostAnyControl" border="0" title="HostAnyControl" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.infragistics.com/aggbug.aspx?PostID=85221" width="1" height="1"&gt;</description><category domain="http://blogs.infragistics.com/blogs/andrew_smith/archive/tags/English/default.aspx">English</category><category domain="http://blogs.infragistics.com/blogs/andrew_smith/archive/tags/NetAdvantage+for+WPF/default.aspx">NetAdvantage for WPF</category><category domain="http://blogs.infragistics.com/blogs/andrew_smith/archive/tags/WPF/default.aspx">WPF</category></item><item><title>BitmapEffects</title><link>http://blogs.infragistics.com/blogs/andrew_smith/archive/2008/04/09/bitmapeffects.aspx</link><pubDate>Wed, 09 Apr 2008 06:08:21 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:76782</guid><dc:creator>[Infragistics] Andrew Smith</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.infragistics.com/blogs/andrew_smith/rsscomments.aspx?PostID=76782</wfw:commentRss><comments>http://blogs.infragistics.com/blogs/andrew_smith/archive/2008/04/09/bitmapeffects.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms743435.aspx" target="_blank"&gt;BitmapEffects&lt;/a&gt; should be used sparingly since currently&lt;sup&gt;1&lt;/sup&gt; they are software rendered but judicious limited usage of them can provide some nice effects for your application. In some cases, their usage is necessary to duplicate a particular look and feel - e.g. using a OuterGlowBitmapEffect to mimic the glow around text in the title area of the ribbon window. However, BitmapEffects are not allowed when running in a limited trust situation - e.g. xbap - so if your template defines a BitmapEffect, that template cannot be used when running in an xbap. &lt;/p&gt;  &lt;p&gt;There are several options you could choose. You could create the bitmap effect in code so you can catch any security exceptions that might arise. This option allows you to catch the exception that would be generated when you don&amp;#39;t have the security required to create it but it assumes that the developer knows when the bitmap effect will be needed. If you&amp;#39;re working with a designer, you&amp;#39;ll want to leave it up to them. The look of the element should be kept as separated as possible from the behavior/code behind. Another option is to create two templates and decide in a style trigger which to use depending on whether you&amp;#39;re running in an xbap. This too isn&amp;#39;t a great option since it means you have to maintain two different templates - more if you have to re-template the element for different themes. &lt;/p&gt;  &lt;p&gt;We chose another route - we created the &lt;a href="http://help.infragistics.com/Help/NetAdvantage/WPF/2007.2/CLR3.X/html/Infragistics3.Wpf.v7.2~Infragistics.Windows.Controls.Markup.SafeOuterGlowExtension.html" target="_blank"&gt;SafeOuterGlowExtension&lt;/a&gt; class. This class is a &lt;a href="http://msdn2.microsoft.com/en-us/library/ms747254.aspx" target="_blank"&gt;markup extension&lt;/a&gt; that can be used to define an OuterGlowBitmapEffect and exposes the same properties available on that class. Since the OuterGlowBitmapEffect is not defined in the xaml, the template can be used even when running in an xbap, in which case the bitmap effect is not created. Currently, this is the only bitmap effect exposed in this manner since it was the only one we needed at the time. If you need to use another bitmap effect, you could follow a similar route for the other bitmap effect classes.&lt;/p&gt;  &lt;p&gt;Example usage:&lt;/p&gt;  &lt;div style="font-family:monospace;"&gt;   &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#8b008b;"&gt;&amp;lt;Page &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot; &lt;/span&gt;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;xmlns:igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://infragistics.com/Windows&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;xmlns:x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot; &lt;/span&gt;&lt;span style="color:#8b008b;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#8b008b;"&gt;&amp;#160; &amp;lt;TextBlock &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Text&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;This text has a glow&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;BitmapEffect&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{igWindows:SafeOuterGlow GlowColor=Yellow}&amp;quot;&lt;/span&gt;&lt;span style="color:#8b008b;"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#8b008b;"&gt;&amp;lt;/Page&amp;gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&lt;span style="font-weight:bold;text-decoration:underline;"&gt;Notes&lt;/span&gt;     &lt;br /&gt;1. Some of the bitmap effects will be hardware accelerated in a &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/02/19/net-3-5-client-product-roadmap.aspx" target="_blank"&gt;service release&lt;/a&gt; due later this year.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.infragistics.com/aggbug.aspx?PostID=76782" width="1" height="1"&gt;</description><category domain="http://blogs.infragistics.com/blogs/andrew_smith/archive/tags/English/default.aspx">English</category><category domain="http://blogs.infragistics.com/blogs/andrew_smith/archive/tags/NetAdvantage+for+WPF/default.aspx">NetAdvantage for WPF</category><category domain="http://blogs.infragistics.com/blogs/andrew_smith/archive/tags/WPF/default.aspx">WPF</category></item><item><title>MousePanning in WPF</title><link>http://blogs.infragistics.com/blogs/andrew_smith/archive/2008/04/04/mousepanning-in-wpf.aspx</link><pubDate>Fri, 04 Apr 2008 06:41:41 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:76781</guid><dc:creator>[Infragistics] Andrew Smith</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.infragistics.com/blogs/andrew_smith/rsscomments.aspx?PostID=76781</wfw:commentRss><comments>http://blogs.infragistics.com/blogs/andrew_smith/archive/2008/04/04/mousepanning-in-wpf.aspx#comments</comments><description>&lt;p&gt;Many applications such as Microsoft Office and web browsers provide the ability to scroll by pressing down the middle mouse button and dragging in the direction that you want to scroll. This feature is often referred to as mouse panning. When you press down the middle mouse button on a scrollable area, an indicator is displayed. This indicator usually has arrows that let you know whether you can scroll vertically and/or horizontally. You can then drag the mouse in a direction to cause the window to scroll. &lt;/p&gt;  &lt;p&gt;We had incorporated this functionality into our UIElement framework in Windows Forms but any element that wanted to utilize it had to opt into the feature, override certain members, and process the panning notifications since scrolling functionality is implemented by each control. In WPF, elements that want to allow for scrolling normally do so by using a &lt;a href="http://msdn2.microsoft.com/en-us/library/ms750665.aspx" target="_blank"&gt;ScrollViewer&lt;/a&gt;. The &lt;a href="http://help.infragistics.com/Help/NetAdvantage/WPF/2007.2/CLR3.X/html/Infragistics3.Wpf.v7.2~Infragistics.Windows.Controls.MousePanningDecorator.html" target="_blank"&gt;MousePanningDecorator&lt;/a&gt; class takes advantage of this fact to provide mouse panning functionality to any ScrollViewer nested within it. You just need to create an instance of this element within your Window/Page and any ScrollViewer within it will receive mouse panning support.&lt;/p&gt;  &lt;div style="font-family:monospace;"&gt;   &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;a href="http://users.infragistics.com/andrews/MousePanningDecorator_12C2C/MousePanningDecorator.jpg"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="82" alt="MousePanningDecorator" src="http://users.infragistics.com/andrews/MousePanningDecorator_12C2C/MousePanningDecorator_thumb.jpg" width="114" border="0" /&gt;&lt;/a&gt;   &lt;p&gt;&lt;/p&gt;  &lt;div style="font-family:monospace;"&gt;   &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Page&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt;&amp;#160;&lt;/div&gt;    &lt;div style="margin-left:8ex;text-indent:-4ex;"&gt;&lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;sys&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;clr-namespace:System;assembly=mscorlib&amp;quot;&lt;/span&gt;&amp;#160;&lt;/div&gt;    &lt;div style="margin-left:8ex;text-indent:-4ex;"&gt;&lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt;&amp;#160;&lt;/div&gt;    &lt;div style="margin-left:8ex;text-indent:-4ex;"&gt;&lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://infragistics.com/Windows&amp;quot;&lt;/span&gt;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Grid&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;MousePanningDecorator&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ScrollViewer&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; HorizontalScrollBarVisibility&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Auto&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Image&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Stretch&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;None&amp;quot;&lt;/span&gt;&amp;#160;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Source&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://veimages.gsfc.nasa.gov/2433/land_shallow_topo_2048.jpg&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ScrollViewer&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;igWindows&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;MousePanningDecorator&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#a31515;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Grid&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;    &lt;div style="margin-left:4ex;text-indent:-4ex;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Page&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;If you want to restyle the indicators, the class exposes several &lt;a href="http://help.infragistics.com/Help/NetAdvantage/WPF/2007.2/CLR3.X/html/Infragistics3.Wpf.v7.2~Infragistics.Windows.Controls.MousePanningDecorator_fields.html" target="_blank"&gt;ResourceKey fields&lt;/a&gt; that can be used to provide custom ImageSources for the indicators.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.infragistics.com/aggbug.aspx?PostID=76781" width="1" height="1"&gt;</description><category domain="http://blogs.infragistics.com/blogs/andrew_smith/archive/tags/English/default.aspx">English</category><category domain="http://blogs.infragistics.com/blogs/andrew_smith/archive/tags/NetAdvantage+for+WPF/default.aspx">NetAdvantage for WPF</category><category domain="http://blogs.infragistics.com/blogs/andrew_smith/archive/tags/WPF/default.aspx">WPF</category></item><item><title>Disabled Images in WPF</title><link>http://blogs.infragistics.com/blogs/andrew_smith/archive/2008/03/30/disabled-images-in-wpf.aspx</link><pubDate>Sun, 30 Mar 2008 07:11:00 GMT</pubDate><guid isPermaLink="false">7a8b7c76-b7ad-48e0-9694-5b04ca132ed0:76780</guid><dc:creator>[Infragistics] Andrew Smith</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.infragistics.com/blogs/andrew_smith/rsscomments.aspx?PostID=76780</wfw:commentRss><comments>http://blogs.infragistics.com/blogs/andrew_smith/archive/2008/03/30/disabled-images-in-wpf.aspx#comments</comments><description>&lt;p&gt;I think most developers and end users have come to expect that when a menu item or button is disabled that the image and text within that item are displayed as grayed out. This provides a visual indication that the item is not available for use. I can understand why the Image element would not do this by default but I was surprised to find that there wasn&amp;#39;t even an option to have it do this for you. If you have an Image within a Button or MenuItem and you disable that element, the Image element within will be disabled but the image it renders will appear no differently than when it was enabled. That is why we created the &lt;strong&gt;&lt;a href="http://help.infragistics.com/Help/NetAdvantage/WPF/2007.2/CLR3.X/html/Infragistics3.Wpf.v7.2~Infragistics.Windows.Controls.AutoDisabledImage.html" target="_blank"&gt;AutoDisabledImage&lt;/a&gt;&lt;/strong&gt; class. This class derives from Image and provides support for automatically&lt;sup&gt;1&lt;/sup&gt; rendering an image as disabled when the element is disabled. You use this element in the same way you would an Image element - just set the Source property to the image that you want to display. When the element is disabled, it will handle converting the image to a gray scale version.&lt;/p&gt;
&lt;div style="FONT-FAMILY:monospace;"&gt;
&lt;div style="MARGIN-LEFT:4ex;TEXT-INDENT:-4ex;"&gt;&lt;span style="COLOR:#8b008b;"&gt;&amp;lt;Page &lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot; &lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT:8ex;TEXT-INDENT:-4ex;"&gt;&lt;span style="COLOR:#0000ff;"&gt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;xmlns:sys&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;clr-namespace:System;assembly=mscorlib&amp;quot; &lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT:8ex;TEXT-INDENT:-4ex;"&gt;&lt;span style="COLOR:#0000ff;"&gt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;xmlns:igWindows&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;http://infragistics.com/Windows&amp;quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT:8ex;TEXT-INDENT:-4ex;"&gt;&lt;span style="COLOR:#0000ff;"&gt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;xmlns:x&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot; &lt;/span&gt;&lt;span style="COLOR:#8b008b;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT:4ex;TEXT-INDENT:-4ex;"&gt;&lt;span style="COLOR:#8b008b;"&gt;&amp;nbsp; &amp;lt;StackPanel&lt;/span&gt;&lt;span style="COLOR:#8b008b;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT:8ex;TEXT-INDENT:-4ex;"&gt;&lt;span style="COLOR:#8b008b;"&gt;&amp;lt;&lt;span style="COLOR:#8b008b;"&gt;igWindows:AutoDisabledImage&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;nbsp;&lt;/span&gt; &lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;Source&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;http://www.infragistics.com/App_Themes/Default/images/logo.gif&amp;quot; &lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT:12ex;TEXT-INDENT:-4ex;"&gt;&lt;span style="COLOR:#0000ff;"&gt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;Stretch&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;None&amp;quot; &lt;/span&gt;&lt;span style="COLOR:#8b008b;"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT:8ex;TEXT-INDENT:-4ex;"&gt;&lt;span style="COLOR:#8b008b;"&gt;&amp;lt;igWindows:AutoDisabledImage &lt;span style="COLOR:#8b008b;"&gt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;IsEnabled&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT:12ex;TEXT-INDENT:-4ex;"&gt;&lt;span style="COLOR:#0000ff;"&gt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;Source&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;http://www.infragistics.com/App_Themes/Default/images/logo.gif&amp;quot; &lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT:12ex;TEXT-INDENT:-4ex;"&gt;&lt;span style="COLOR:#0000ff;"&gt;&lt;/span&gt;&lt;span style="COLOR:#ff0000;"&gt;Stretch&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;None&amp;quot; &lt;/span&gt;&lt;span style="COLOR:#8b008b;"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT:4ex;TEXT-INDENT:-4ex;"&gt;&lt;span style="COLOR:#8b008b;"&gt;&amp;nbsp; &amp;lt;/StackPanel&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT:4ex;TEXT-INDENT:-4ex;"&gt;&lt;span style="COLOR:#8b008b;"&gt;&amp;lt;/Page&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;img height="107" alt="Example using the AutoDisabledImage" src="http://users.infragistics.com/andrews/AutoDisabledImage_12C1D/AutoDisabledImage_thumb.jpg" width="202" border="0" /&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-WEIGHT:bold;TEXT-DECORATION:underline;"&gt;Notes&lt;/span&gt; &lt;br /&gt;1.&amp;nbsp; The current implementation only works with a BitmapSource derived ImageSource. If you use a DrawingImage, the Image will continue to appear as it did when it was enabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.infragistics.com/aggbug.aspx?PostID=76780" width="1" height="1"&gt;</description><category domain="http://blogs.infragistics.com/blogs/andrew_smith/archive/tags/English/default.aspx">English</category><category domain="http://blogs.infragistics.com/blogs/andrew_smith/archive/tags/NetAdvantage+for+WPF/default.aspx">NetAdvantage for WPF</category><category domain="http://blogs.infragistics.com/blogs/andrew_smith/archive/tags/WPF/default.aspx">WPF</category></item></channel></rss>