Reference Infragistics.Themes.MetroDarkTheme.dll (This article takes Metrodarktheme as an example)
and add in App.xaml:
<Applicationx:class= "Metrodarkthemetest.app"xmlns= "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x= "Http://schemas.microsoft.com/winfx/2006/xaml"xmlns:local= "Clr-namespace:metrodarkthemetest"StartupUri= "MainWindow.xaml"> <application.resources> <ResourceDictionary> <resourcedictionary.mergeddictionaries> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.datavisualization.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.olapcharts.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.wpf.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamcalendar.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamcolorpicker.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamcomboeditor.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamdatachart.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamdatapresenter.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamdatatree.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamdatetimeinput.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamdiagram.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamdialogwindow.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamdockmanager.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xameditors.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamformulaeditor.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamgantt.contextmenuicons.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamgantt.taskmodeicons.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamgantt.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamgauges.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamgeographicmap.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamgrid.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xammap.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xammaskedinput.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xammenu.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xammulticolumncombo.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamnetworknode.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamorgchart.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamoutlookbar.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xampivotdataslicer.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xampivotgrid.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xampropertygrid.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamradialmenu.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamribbon.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamrichtexteditor.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamschedule.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamslider.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamsparkline.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamspellchecker.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamspreadsheet.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamspreadsheetcontextmenuresourceset.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamsyntaxeditor.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamtagcloud.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamtilemanager.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamtimeline.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/metrodark.xamtreemap.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/styles.shared.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/styles.wpf.xaml"/> <ResourceDictionarySource= "/infragistics.themes.metrodarktheme;component/theme.colors.xaml"/> </resourcedictionary.mergeddictionaries> </ResourceDictionary> </application.resources></Application>
Sources of Infragistics.Themes.MetroDarkTheme.dll:
After installing Infragistics_wpf_20151_samples.msi
C:\Users\Public\Documents\Infragistics\2015.1\WPF\Samples\CLR4.0\Infragistics.Themes\MetroDarkTheme.WPF\ Infragistics.Themes.MetroDarkTheme.WPF.csproj
Release generation
Extraction of ResourceDictionary:
DirectoryInfo dir =NewDirectoryInfo (@"C:\Users\Public\Documents\Infragistics\2015.1\WPF\Samples\CLR4.0\Infragistics.Themes\MetroDarkTheme.WPF "); fileinfo[] Files= dir. GetFiles ("*.xaml"); foreach(FileInfo Finchfiles) {Console.WriteLine ("<resourcedictionary source=\ "/infragistics.themes.metrodarktheme;component/"+ F.name +"\ "/>"); }
Infragistics WPF app theme to all controls