Permalink
Browse files

Small fixes to set telerik theme.

  • Loading branch information...
mariomeyrelles committed Oct 10, 2012
1 parent 6d1e99a commit 92772921ea2d51b4683336e660357c7475eb32a6
@@ -45,8 +45,8 @@ private void ThisWorkbookStartup(object sender, System.EventArgs e)
//Start WPF in another thread.
var wpfInit = new System.Action(InitializeWpfEngine);
- wpfInit.BeginInvoke(null, null);
-
+ //wpfInit.BeginInvoke(null, null);
+ wpfInit();
WorksheetsLoaded += ThisWorkbookWorksheetsLoaded;
}
@@ -69,13 +69,37 @@ private void InitializeWpfEngine()
UriKind.RelativeOrAbsolute))
as System.Windows.ResourceDictionary;
- //// Recursos visuais do Reuxables
- // //var resource2 = System.Windows.Application.LoadComponent(
- // // new Uri("/ReuxablesLegacy;component/edge.xaml", UriKind.RelativeOrAbsolute))
- // // as System.Windows.ResourceDictionary;
-
+ //Load Telerik WPF theme: Summer
+ var uri1 = new Uri("/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.xaml", UriKind.RelativeOrAbsolute);
+ var uri2 = new Uri("/Telerik.Windows.Themes.Summer;component/Themes/System.Windows.xaml", UriKind.RelativeOrAbsolute);
+ var uri3 = new Uri("/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Input.xaml", UriKind.RelativeOrAbsolute);
+ var uri4 = new Uri("/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Navigation.xaml", UriKind.RelativeOrAbsolute);
+ var uri5 = new Uri("/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Chart.xaml", UriKind.RelativeOrAbsolute);
+ var uri6 = new Uri("/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Data.xaml", UriKind.RelativeOrAbsolute);
+ var uri7 = new Uri("/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.DataVisualization.xaml", UriKind.RelativeOrAbsolute);
+ var uri8 = new Uri("/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Expressions.xaml", UriKind.RelativeOrAbsolute);
+ var uri9 = new Uri("/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Gridview.xaml", UriKind.RelativeOrAbsolute);
+ var r1 = System.Windows.Application.LoadComponent(uri1) as System.Windows.ResourceDictionary;
+ var r2 = System.Windows.Application.LoadComponent(uri2) as System.Windows.ResourceDictionary;
+ var r3 = System.Windows.Application.LoadComponent(uri3) as System.Windows.ResourceDictionary;
+ var r4 = System.Windows.Application.LoadComponent(uri4) as System.Windows.ResourceDictionary;
+ var r5 = System.Windows.Application.LoadComponent(uri5) as System.Windows.ResourceDictionary;
+ var r6 = System.Windows.Application.LoadComponent(uri6) as System.Windows.ResourceDictionary;
+ var r7 = System.Windows.Application.LoadComponent(uri7) as System.Windows.ResourceDictionary;
+ var r8 = System.Windows.Application.LoadComponent(uri8) as System.Windows.ResourceDictionary;
+ var r9 = System.Windows.Application.LoadComponent(uri9) as System.Windows.ResourceDictionary;
+
// Merge it on application level
_wpfApp.Resources.MergedDictionaries.Add(resources);
+ _wpfApp.Resources.MergedDictionaries.Add(r1);
+ _wpfApp.Resources.MergedDictionaries.Add(r2);
+ _wpfApp.Resources.MergedDictionaries.Add(r3);
+ _wpfApp.Resources.MergedDictionaries.Add(r4);
+ _wpfApp.Resources.MergedDictionaries.Add(r5);
+ _wpfApp.Resources.MergedDictionaries.Add(r6);
+ _wpfApp.Resources.MergedDictionaries.Add(r7);
+ _wpfApp.Resources.MergedDictionaries.Add(r8);
+ _wpfApp.Resources.MergedDictionaries.Add(r9);
// _wpfApp.Resources.MergedDictionaries.Add(resource2);
@@ -104,8 +128,7 @@ private void ThisWorkbookWorksheetsLoaded(object sender, EventArgs e)
private void ThisWorkbookShutdown(object sender, System.EventArgs e)
{
- //todo: finalizar a instância do engine do WPF ?.
- //_wpfApp.Shutdown();
+ _wpfApp.Shutdown();
}
private void ThisWorkbookBeforeSave(bool saveAsUi, ref bool cancel)
@@ -71,10 +71,10 @@
<Reference Include="Telerik.Windows.Diagrams.Core, Version=2012.2.607.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
<Reference Include="Telerik.Windows.Documents, Version=2012.2.607.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
<Reference Include="Telerik.Windows.Themes.Summer">
- <HintPath>..\..\..\..\..\Program Files\Telerik\RadControls for WPF Q2 2012\Binaries.NoXaml\WPF40\Telerik.Windows.Themes.Summer.dll</HintPath>
+ <HintPath>..\..\..\..\..\Program Files (x86)\Telerik\RadControls for WPF Q2 2012\Binaries.NoXaml\WPF40\Telerik.Windows.Themes.Summer.dll</HintPath>
</Reference>
<Reference Include="Telerik.Windows.Themes.Vista">
- <HintPath>..\..\..\..\..\Program Files\Telerik\RadControls for WPF Q2 2012\Binaries.NoXaml\WPF40\Telerik.Windows.Themes.Vista.dll</HintPath>
+ <HintPath>..\..\..\..\..\Program Files (x86)\Telerik\RadControls for WPF Q2 2012\Binaries.NoXaml\WPF40\Telerik.Windows.Themes.Vista.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
Binary file not shown.

0 comments on commit 9277292

Please sign in to comment.