Any option to apply themes to other thirdparty controls along with ActiPro

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 6 years ago by sravanthi
Version: 13.2.0591
Avatar

Hi In my application for some requirements i am using Telerik for datagrids where they have different options like childGrids, Aggregatefunctions...etc where we dont have those options in ActiPro. But i like most of the features from ActiPro and we are using it.

So is there a way to make actipro themes appicable to those controls.. too pls suggest any solution.

Comments (6)

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, yes you can use our theme system with any control.  Our themes are comprised of hundreds of reusable brush, thickness, etc. assets.  Some of our samples like the "Theme Reuse" and "Themed Custom Control" QuickStarts show how to use these assets.


Actipro Software Support

Posted 6 years ago by sravanthi
Avatar

Can we have multiple custom themes in ThemedResourceDictionaryReference by overriding Themename.Custom with my custom.xaml file.

As i see here if i add multiple overrides with my custom xaml files (by overriding custom theme) , at last it was taking final xmal file. How to use all my custom themes ?

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Well if you use the "Custom" name for all your themes, they will override each other.  Theme names are just unique string keys.  Thus, you can use different string names for each theme (e.g. "Custom1", "Custom2", etc.).


Actipro Software Support

Posted 6 years ago by sravanthi
Avatar
 public override IEnumerable<ThemedResourceDictionaryReference> DictionaryReferences
        {
            get
            {
                if (dictionaryReferences == null)
                {
                    string baseUri = ResourceHelper.GetLocationUriStringBase(Assembly.GetExecutingAssembly()) + "CustomThemes/";

                    dictionaryReferences = new ThemedResourceDictionaryReference[] {
						new ThemedResourceDictionaryReference() { 
							LocationUri = new Uri(baseUri + "Steam.xaml", UriKind.RelativeOrAbsolute),
							Themes = new string[] { 
								ThemeName.Custom.ToString(), 							},
						},
                        					};

                }
                return dictionaryReferences;
            }
        }

 In The above method we see that ThemeName is an enum and Custom is one value to use  our customtheme, which is Steam.xaml. We need few more custom themes which probably might have names like Steam1.xaml, Steam2.xaml.

We dont want ThemeName.Custom to override the steam.xaml. We need our custom themes work independent like your themes in sample (OfficeBlue, Classic etc..) Suggest me anything that would help implement our custom themes.

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

ThemeName just holds the predefined names.  Note that you are doing a ToString() on it there since the theme name can be any string.  Thus, per our previous reply, you can use a direct string instead, like "Custom1", "Custom2", etc.


Actipro Software Support

Posted 6 years ago by sravanthi
Avatar

Thanks for your suggestion. It worked...

The latest build of this product (v2019.1 build 0682) was released 30 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.