Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1830
Theme for Custom Control
posted

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.

resources.zip
Parents
No Data
Reply
  • 1830
    Offline posted

    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);

      }

     

Children