c# - Telerik RadWindow -


i'm facing issues telerik themes in wpf have added reference telerik.windows.themes.windows8 , merged resources using file app.xaml following code:

<application.resources>     <resourcedictionary>         <resourcedictionary.mergeddictionaries>             <resourcedictionary source="/telerik.windows.themes.windows8;component/themes/system.windows.xaml"/>             <resourcedictionary source="/telerik.windows.themes.windows8;component/themes/telerik.windows.controls.xaml"/>             <resourcedictionary source="/telerik.windows.themes.windows8;component/themes/telerik.windows.controls.navigation.xaml"/>             <resourcedictionary source="/telerik.windows.themes.windows8;component/themes/telerik.windows.controls.docking.xaml"/>         </resourcedictionary.mergeddictionaries>     </resourcedictionary> </application.resources> 

now want apply windows 8 style main windows, changed telerik:radwindow

<telerik:radwindow         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"         x:class="foo.mainwindow"         header="mainwindow" height="350" width="525">     <grid>         <textblock horizontalalignment="left" margin="37,79,0,0" textwrapping="wrap" text="textblock" verticalalignment="top"/>         <telerik:radslider horizontalalignment="left" margin="273,156,0,0" verticalalignment="top" width="200"/>         <telerik:radbutton content="button" horizontalalignment="left" height="auto" margin="158,232,0,0" verticalalignment="top" width="auto" click="buttonbase_onclick"/>     </grid> </telerik:radwindow> 

in designer theme applied , looks ok: img when start application looks totally different: img

i have no idea why error occurs. if use code create radwindow works perfectly:

radwindow w = new radwindow(); w.width = 500; w.height = 500; w.show(); 

i think you're using implicit styles need state window style based on implicit styles you've imported. add inside radwindow xaml:

<telerik:radwindow.style>     <style targettype="telerik:radwindow" basedon="{staticresource radwindowstyle}" /> </telerik:radwindow.style> 

alternatively add resource dictionary (local:mainwindow should resolve foo.mainwindow):

<style basedon="{staticresource radwindowstyle}" targettype="local:mainwindow" /> 

here links may prove useful:

http://www.telerik.com/forums/show-radwindow-with-implict-style http://www.telerik.com/support/kb/wpf/window/details/how-to-use-radwindow-as-main-window


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -