This is a migrated thread and some comments may be shown as answers.

Predefined Dialogs - Implicit Styles - dll

1 Answer 108 Views
Window
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 15 Oct 2014, 06:12 PM
Hi,

how to set theme for predefined dialog when window from which dialog called is within the dll that is called from WinForms?
Currently the window is not displayed.

<Window.Resources>
       <ResourceDictionary>
           <ResourceDictionary.MergedDictionaries>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml"/>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml"/
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
           </ResourceDictionary.MergedDictionaries>

bool? dialogResult = null;
                   RadWindow.Confirm(new DialogParameters()
                   {
                       Owner = this,
                       Closed = (w, x) =>
                       {
                           dialogResult = x.DialogResult;
                       }
                   });

1 Answer, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 17 Oct 2014, 11:35 AM
Hi Michael,

In order to automatically located the needed Styles, the ResourceDictionaries should be merged in App.xaml. I assume this is not possible in your case, so you can try to manually apply the needed styles as shown below:

RadWindow.Confirm(new DialogParameters()
{
    WindowStyle = this.Resources["RadWindowStyle"] as Style,
    ContentStyle = this.Resources["RadConfirmStyle"] as Style
});

Please test it and let me know if it helps.

Regards,
Kalin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Window
Asked by
Michael
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Share this question
or