I'm using a custom control inside a field's EditTemplate. I'd like to apply the Infragistics theme (Office2k7Silver for now) to the custom control for consistency. Specifically the control has a popup with a listbox, and at minimum I'd like the mouseover of thelist to be consistent with that of the XamComboEditor. I've attached the resource dictionary for the custom control. Thanks for the help.
It a minimum, I'd like to override the HighlightBrushKey with the brush used in the theme (I'm not good enough with WPF styling to navigate the maze of theme files, though I'm familiar with Andrew Smith's excelent blog on styling issues withe themes). Also, the control loads it's styles in code each time it is loaded as follows (I didn't write the control):
if (Application.Current.TryFindResource("AcTb_ListBoxStyle") == null) // changed to TryFindResource
{
var myResourceDictionary = new ResourceDictionary();
var uri = new Uri("/dragonz.actb;component/resource/Resources.xaml", UriKind.Relative);
myResourceDictionary.Source = uri;
Application.Current.Resources.MergedDictionaries.Add(myResourceDictionary);
}
Hello Darryl,
Thank you for your posts. I have been looking into it and I can suggest using the brushes of the Office2k7Silver, to style your ListBox. You can get the styles and brushes of that theme by going to your Infragistics folder, then to NetAdvantage 2012.2 -> WPF -> DefaultStyles -> DataPresenter, the default path is C:\Program Files (x86)\Infragistics\NetAdvantage 2012.2\WPF\DefaultStyles\DataPresenter. In that folder, you can find the xaml files that contains the styles for each theme. The brushes for Office2k7Silver are located at DataPresenterOffice2k7Silver_Brushes.xaml file and you can use those bushes to achieve the appearance of the ListBox.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you for your reply. I am very glad that you have managed to solve the issue that you were having. Please let me know if I can assist you with anything else.
For the benefit of anyone else wanting to do this, what I had to do was look in the brushes xaml for the silver theme as Krasimir pointed, but where I see no keys that clue me to what I need. Then I go to the main xaml for the theme and see that my silver brushes are merged along with the blue theme. Then I look thru the blue theme control templates and see that the combobox mouseover uses a brush called "DropdownBtnHottrackCenterFillKey". Then I go back to the silver brushes file and grab that gradient brush.
I'm familiar with the location of those files, but understanding which of those hundreds of brushes is another thing.
At a minimum I'd like to know the name/location of the mouseover brush for the ComboEditor dropdown, and wouldn't that be in the Editors file(s)?