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

Apply themes on RadControls Q1 2009

44 Answers 875 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rogério
Top achievements
Rank 1
Rogério asked on 12 Mar 2009, 06:28 PM
Hello,

I've just installed the new RadControls Q1 2009 and tried to change the sample application theme!
I already checked several posts regarding theming but I could not find any answer to my problem.
Example:
http://www.telerik.com/community/forums/silverlight/window/change-theme-of-radwindow.aspx

It seams that something changed on this version!

Could you explain what should I do on this version?

Thanks.

44 Answers, 1 is accepted

Sort by
0
Accepted
Hristo
Telerik team
answered on 13 Mar 2009, 09:08 AM
Hi Rogério,

We have made some modifications in theming mechanism in this release (Q1 2009).
There are two ways that you can use to change the application theme.
The first way is to use StyleManager.ApplicationTheme property:
StyleManager.ApplicationTheme = ThemeManager.FromName("Vista"); 
Put this line in the Application constructor (before InitializeComponent method).

With this release we shipped three predefined themes: Vista, Summer and Office_Black (this is the default theme). You can use ThemeManager.FromName method with this three keys. FromName will return Theme object with predefined source property.

The second way is to use directly the Theme class:
Theme cutomTheme = new Theme(new Uri("/MyCustomThemeAssembly;component/Themes/generic.xaml", UriKind.Relative));  
cutomTheme.IsApplicationTheme = true

Using Theme class allows you to specify custom or predefined theme.

Let me know if you need more information.


Greetings,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jamest
Top achievements
Rank 2
answered on 13 Mar 2009, 03:18 PM
As soon as I add this line to my App Constructor I get the error below, any ideas? (Removing the line doesn't throw the error) I have every dll from the binaries referenced in my project. 

    Telerik.Windows.Controls.StyleManager.ApplicationTheme = Telerik.Windows.Controls.ThemeManager.FromName("Vista");

 

public App()  
{  
   this.Startup += this.Application_Startup;  
   this.Exit += this.Application_Exit;  
   this.UnhandledException += this.Application_UnhandledException;  
   Telerik.Windows.Controls.StyleManager.ApplicationTheme = Telerik.Windows.Controls.ThemeManager.FromName("Vista");  
   InitializeComponent();  
}  
 

 

 


System.Windows.Markup.XamlParseException occurred
  Message="AG_E_RUNTIME_MANAGED_UNKNOWN_ERROR [Line: 145 Position: 44]"
  LineNumber=145
  LinePosition=44
  StackTrace:
       at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at MyApp.Page.InitializeComponent()
       at MyApp.Page..ctor()
  InnerException:

Thank you for your time,
         Ender

Edit: Typo

0
Hristo
Telerik team
answered on 13 Mar 2009, 04:39 PM
Hi Ender,

Most probably you have unchecked "Enable Just My Code (Managed only)" in Visual Studio menu.
Please check it if you don't want to see this error. It is in Tools->Options->Debugging->General->Enable Just My Code (Managed only).

This errors are handled so your application will work.

Sincerely yours,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jamest
Top achievements
Rank 2
answered on 13 Mar 2009, 04:56 PM
Thank you for your reply, unfortunately "Enable Just My Code (Managed only) was checked with the sub item "warn if no user code on launch". I had the futures assemblies running and then installed Q1. I just uninstalled both and reinstalled only the Q1 trial. I had the futures version running pretty well, and after installing Q1 I  have this template issue and none of the Rad controls will render in Expression Blend 2/or VS2008 preview. Yet I get no compiling errors. When control is run all the rad controls function as expected.
Edit - purchased product opening support
0
Eric Schoenholzer
Top achievements
Rank 2
answered on 16 Mar 2009, 04:13 PM

You mention only 3 themes.

What about the others included dll like "Telerik.Windows.Themes.Default_Green.dll" ?

Are they not working?

Thanks

Eric

0
Eric Schoenholzer
Top achievements
Rank 2
answered on 16 Mar 2009, 04:22 PM

The theming doesn't work in my project.

The StyleManager is set to "Vista".

But when I add later dynamically a new panel with a RadChart inside, it is using the default theme (Black).

Why it doesn't use "Vista" ?

Eric

0
Hristo
Telerik team
answered on 16 Mar 2009, 04:38 PM
Hello Eric,

Only the Vista, Summer and the default Office_Black themes are provided. The other do not contain Styles for all of our controls (and in fact they contain color schemes for Summer theme so they should be actually called Summer_Red, Summer_Green, etc...).

What are you using: StyleManager.Theme="Vista" or the static property StyleManager.ApplicationTheme?
The first one set theme only to the control that you attach it.
The second one change the global (application) theme so RadChart should be with the Vista theme.
If you are using the second one can you send us a sample project demonstrating your scenario?
Thanks.

Regards,
Hristo
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Eric Schoenholzer
Top achievements
Rank 2
answered on 16 Mar 2009, 05:04 PM

Hi Hristo,

I'm using:

        public App()  
        {  
            this.Startup += this.Application_Startup;  
            this.Exit += this.Application_Exit;  
            this.UnhandledException += this.Application_UnhandledException;  
 
            StyleManager.ApplicationTheme = ThemeManager.FromName("Vista");  
 
            InitializeComponent();  
        }  
 

So I try to prepare a sample project.

Thanks

Eric

0
Eric Schoenholzer
Top achievements
Rank 2
answered on 16 Mar 2009, 10:05 PM
I have posted the project. Ticket ID 197943.

Thanks
Eric
0
Simon
Top achievements
Rank 1
answered on 17 Mar 2009, 10:35 AM
Hello,

where can I find the Summer-Theme, you wrote about?
Or did you mean the "default_"-Themes?

Simon
0
Sir
Top achievements
Rank 1
answered on 18 Mar 2009, 12:25 AM

I have the same issue.
I've never been able to get different themes to show based on multiple examples from telerik videos & web pages.
Futures didn't work, and now Q1 2009 doesn't work.
 
StyleManager.ApplicationTheme = ThemeManager.FromName("Vista");

didn't work

Theme cutomTheme = new Theme(new Uri("/Telerik.Windows.Themes.Default_Red;component/Themes/generic.xaml", UriKind.Relative));
cutomTheme.IsApplicationTheme = true;
didn't work

<Grid.Resources>

<telerik:Theme Source="/Telerik.Windows.Themes.Vista;component/themes/generic.xaml" x:Key="theme"></telerik:Theme>

</Grid.Resources>

didn't work

One of these days I'm going to be blown away just by seeing it actually work for the first time.

0
Hristo
Telerik team
answered on 18 Mar 2009, 12:36 PM
Hello Sir Real,

Can you send us sample project demonstrating the problem you have.
To apply Vista theme you have to add reference to Telerik.Windows.Themes.Vista assembly.
Then in the Application constructor (before InitializeComponents method) set StyleManager.ApplicationTheme property like this:

StyleManager.ApplicationTheme = ThemeManager.FromName("Vista"); 

That's it. This works for Silverlight and WPF.

All the best,
Hristo
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Nik
Top achievements
Rank 1
answered on 18 Mar 2009, 03:06 PM
Hi

I am getting the AG_E_RUNTIME_MANAGED_UNKNOWN_ERROR [Line: 54 Position: 56]

Even I am not using the Theme. I have set the same thing u have mentioned in the Tool->Option ....
Still no luck.


This error is really disturbing me. Please help me out its urgent.



0
Hristo
Telerik team
answered on 18 Mar 2009, 05:20 PM
Hello Nik,

Could you send us project where this error happens?
Without project there is little we can do.

Sincerely yours,
Hristo
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
SL
Top achievements
Rank 1
answered on 18 Mar 2009, 07:25 PM

Not able to get your exmaple to work with a custom theme for Q1 2009

Theme cutomTheme = new Theme(new Uri("/MyCustomThemeAssembly;component/Themes/generic.xaml", UriKind.Relative));     
cutomTheme.IsApplicationTheme = true;    
 

All I did was take the Office_Black Source and modify the colors from Orange to our site colors of Green compiled it and renamed it to Telerik.Windows.Themes.CustomTheme.  Then referenced this in the SL.  Also I noticed the the Office_Black theme does not have  a generic.xaml but rather an Generil_SL.xaml.  So here is what my version looked like, please tell me what step I left out. 

Theme cutomTheme = new Theme(new Uri("/Telerik.Windows.Themes.CustomTheme;component/Themes/Generic_SL.xaml", UriKind.Relative));        
cutomTheme.IsApplicationTheme = true;       
    
 

thanks for the help to get this working...
0
Eric Schoenholzer
Top achievements
Rank 2
answered on 19 Mar 2009, 10:44 AM
After the response from your support team, RadChart doesn't support the theming mechanism in Silverlight.

You need to set the skin via code.

this.radChart1.Skin = "Vista";  

Eric
0
Jamest
Top achievements
Rank 2
answered on 19 Mar 2009, 08:14 PM
SL, I am curious about the resolution of your issue.
0
Sir
Top achievements
Rank 1
answered on 23 Mar 2009, 08:02 PM
Hello Hristo, thanks.

Here is the link to a zip file which is my entire project.
Theme Test Project

It is just a simple RadSilverlight Menu (I was following one of your training videos).
I cannot get the menu's theme to change no matter what theme I throw at it.
Right now, the theme changing code is commented out in App.xaml.cs

I appreciate if you can take a look and let me know what I'm doing wrong.

(It would also be great if you can find out why I cannot get the menu to show in the upper left corner of the browser.  Our company uses IE6 internally)

Thanks,
Ray
0
Hristo
Telerik team
answered on 24 Mar 2009, 02:53 PM

Hi Sir,

You are unable to change the themes because the WebApplication is not connected with the silverlight application thus changes made in silverlight will not reflect in the web app (no one will copy the xap file from silverlight to web ClientBin directory).

To link both project you should right click on the web project -> Property pages -> Silverlight Application.

Then hit Add button and choose Silverlight project (from the dropdown) and click Add button. This way you will connect the web application with the silverlight application and all xap file will be copied to the web application ClientBin directory.

After that go to App.xaml.cs and uncomment the StyleManager line. And you will have vista theme.
One recommendation: remove the unused assemblies like: Telerik.Windows.QuickStart and all Default_* Themes assemblies (they do not include styles for all controls).

About not being able place RadPane in top left - the reason is that RadFrameContainer is actually a Grid panel. Grid panel have by default HorizontalAlignment and VerticalAlignment set to Stretch and is taking all available space. Then your pages (RadPage) has some Width set and this width is smaller then the Grid actual width. So the grid centers the pages. If you want to put them at top left position just set HorizontalAlignment="Left" and VerticalAlignment="Top" on every page.

One small note: the ScriptManager is taking some place at the top. Surround it with div element like this to remove the space reserved for it:

<div style="margin:0; padding:0">  
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnableHistory="true">  
    </asp:ScriptManager> 
</div> 

Let me know if you need more information.

Regards,

Hristo
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Sir
Top achievements
Rank 1
answered on 24 Mar 2009, 07:02 PM
Hristo,

That is so awesome, thank you!
I did all your suggestions and everything is perfect.
Again, thanks for your time, patience, & tips.

Ray
0
Maarten
Top achievements
Rank 1
answered on 26 Mar 2009, 01:49 PM
Hello,

I'm having a similar issue.
I can set the vista theme, but I can't set a custom theme (eg. the theme from http://blogs.telerik.com/ValentinStoychev/Posts/08-11-19/Tweaking_the_Theme_colors_for_Telerik_Silverlight_Controls.aspx ).

Setting the theme in xaml results in an error, setting it in code behind doesn't change a thing.

You can download my solution file over here.

Thanks in advance.

Kind regards,


Maarten Thoelen


0
David
Top achievements
Rank 1
answered on 30 Mar 2009, 02:19 AM
Like Maarten, I can set the Vista theme, but I cannot set any other theme aside from Summer... In my references, I have included every single theme reference. If I do Office_Black, nothing. If I do Default_Black, nothing. If I do Default_Red, nothing. This seems a little flakey, and I'm not sure why.

Also, is there more documentation to be found other than taking guesses at intellisence and http://www.telerik.com/help/silverlight/introduction.html? The videos are useful, but it seems you know something that we don't know everytime I watch them. The tools are great, but the reference material for Silverlight controls really seems to be lacking.

It'd be great to have a list of properties/methods for each control and what they do--in plain English. These tools are probably great if you've been a .NET programmer for a while, but they're really tricky to figure out if you're jumping from another language over to the Microsoft side. More helpful resources would be great.
0
Hristo
Telerik team
answered on 30 Mar 2009, 08:30 AM
Hi David,

With the Q1 release we shipped only three themes: Vista, Summer and the default Office_Black.
The Default_* should not be used because they are just color variations of Summer theme and they do not include styles for all of our controls.
One other thing - if you want to use the Office_Black theme you don't need to add reference to the Office_Black assembly because this theme is the default one. Also, setting the Office_Black should be done like this:
<UserControl x:Class="SilverlightApplication31.Page2" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
    Width="400" Height="300">  
    <UserControl.Resources> 
        <telerik:Theme Source="/Telerik.Windows.Controls;component/Themes/generic.xaml" 
                x:Key="officeBlackTheme" /> 
    </UserControl.Resources> 
    <Grid x:Name="LayoutRoot" Background="White">  
        <RadioButton Content="I have Theme" VerticalAlignment="Center" telerik:StyleManager.Theme="{StaticResource officeBlackTheme}"/>  
        <RadioButton Content="NO Theme" VerticalAlignment="Center" Margin="0 35 0 0"/>  
    </Grid> 
</UserControl> 

As for the documentation - you are right. We will definitely improve it.
Thank you for your feedback.

Let us know if you need more help.

Best wishes,

Hristo
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Vic
Top achievements
Rank 2
answered on 30 Mar 2009, 07:17 PM
Hello,

This is regarding RadControls Q1 2009 and the use of the Vista theme

Simply enough I added a reference to Telerik.Windows.Themes.Vista and added the following code to my app.xaml

 public App() 
        { 
            this.Startup += this.Application_Startup; 
            this.Exit += this.Application_Exit; 
            this.UnhandledException += this.Application_UnhandledException; 
 
            // Telerik Vista Theme (needs to be set before page is added to the RootVisual) 
            // http://www.telerik.com/community/forums/silverlight/general-discussions/apply-themes-on-radcontrols-q1-2009.aspx 
            StyleManager.ApplicationTheme = ThemeManager.FromName("Vista"); 
             
            InitializeComponent(); 
        } 

Whenrun the following exceptions occurred in succession:

System.Windows.Markup.XamlParseException
Invalid attribute value telerikEditor:RadEditor for property TargetType. [Line: 1 Position: 225]
Invalid attribute value telerikInput:RadCalendar for property TargetType. [Line: 1 Position: 223]
Invalid attribute value calendar:CalendarView for property TargetType. [Line: 1 Position: 228]
Invalid attribute value player:PlaylistPresenter for property TargetType. [Line: 1 Position: 223]
Invalid attribute value dock:PaneHeader for property TargetType. [Line: 1 Position: 225]
Invalid attribute value Docking:RadPane for property TargetType. [Line: 1 Position: 220]
AG_E_PARSER_BAD_TYPE [Line: 1 Position: 291]
Invalid attribute value telerikChart:RadChart for property TargetType. [Line: 1 Position: 226]
AG_E_PARSER_BAD_TYPE [Line: 1 Position: 292]
Invalid attribute value telerikGauge:RadGauge for property TargetType. [Line: 1 Position: 223]
Invalid attribute value grid:GridViewLoadingIndicator for property TargetType. [Line: 1 Position: 227]
Invalid attribute value controls:RadGridView for property TargetType. [Line: 1 Position: 222]

Ignoringall warrants success but was wondering what the cause is, right now I am onlyusing the RadTreeView and RadWindow.

Anyhelp is appreciated.

Thanks,
Vic
0
Hristo
Telerik team
answered on 31 Mar 2009, 06:43 AM
Hello Vic,

If you check Enable Just My Code (Managed Only) in Tools->Options->Debugging you won't see this errors. The cause of this is that our assembly (Telerik.Windows.Themes.Vista) have styles for all controls (e.g. RadWindow, RadDocking, RadEditor, RadSlider). We parse this assembly resources and try to load this types. If the load succeeds then we load (parse) this style. If the load fail then an exception is raised (and this exception is catched - but if you uncheck this option that I mention in the beginning you will still see it) and we don't load this style.
This is needed because we wanted to have single assembly including styles for all RadControls but you may not have references to all needed assemblies.
For the next version we will improve the way of checking if one assembly is loaded (so even if you uncheck enable just my code you won't see exceptions).

I hope this helps. Let me know if you need more information.

Sincerely yours,
Hristo
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
yjh
Top achievements
Rank 1
answered on 17 Apr 2009, 10:05 AM
How can I apply vista theme to radpanelbar if not call StyleManager.ApplicationTheme = ThemeManager.FromName("Vista");  in the Application constructor before InitializeComponent method ?
0
Valentin.Stoychev
Telerik team
answered on 20 Apr 2009, 07:01 AM
Hello yjh,

Check this help article:
http://www.telerik.com/help/silverlight/applying-theme-to-stanard-controls.html

Sincerely yours,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
yelong
Top achievements
Rank 1
answered on 20 Apr 2009, 09:53 PM
I'd like to know if we can still have the old Default_Black theme in this release.
0
yjh
Top achievements
Rank 1
answered on 21 Apr 2009, 12:37 AM
Thanks.

But Source="/Telerik.Windows.Controls;component/Themes/generic.xaml" doesn't indicate the theme name. If I want use Vista theme,how to do it ?
0
Bobi
Telerik team
answered on 21 Apr 2009, 10:48 AM
Hello Rogério,

You can set the Vista theme by using one of the following techniques:

1.If you want to set a global theme for the entire application use this:
 
<UserControl.Resources>
        <controls:VistaTheme x:Key="theme" IsApplicationTheme="True"/>
    </UserControl.Resources>
Where controls is :
 xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"

2. If you want to have different themes in one application you can use this:

<telerik:RadToolBar controls:StyleManager.Theme="Vista"/>

or

<UserControl.Resources>
        <controls:VistaTheme x:Key="theme" IsApplicationTheme="False"/>
    </UserControl.Resources>
<telerik:RadToolBar  core:StyleManager.Theme="{StaticResource theme}"/>

3. You can acieve the same functionality in this way too:

<UserControl.Resources>
<core:Theme x:Key="theme"  Source="/Telerik.Windows.Themes.Vista;component/Themes/generic.xaml"/>
</UserControl.Resources>

<telerik:RadToolBar core:StyleManager.Theme="{StaticResource theme}"/>

Note: Do not forget to add a reference to the Telerik.Windows.Themes.Vista.dll !

I hope this answers your question.

Best wishes,
Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Toshendra
Top achievements
Rank 1
answered on 16 Jun 2009, 02:28 PM
Any Idea when Default_*  Themes are going to be fully supported? I think they are great!
I would like to try it out on silverlight 3 if your intrim release supports it.
0
Nikolay
Telerik team
answered on 19 Jun 2009, 08:14 AM
Hi Toshendra,

Thanks for your question.

For the upcoming Q2 release we will include two color variations of the Office theme - Office Blue and Office Silver. As the Office Black theme became the default theme with Q1 2009  we are currently focused on making color variations of it. For the next major release Q3, we will be working on a new theme and again we will include color variations of it.  As for the Summer theme, we do not plan to support its color variations as we will be mainly focused on the new themes that will be significantly improved. However, you can change the brushes of the Summer theme yourself and we can assist you along the way so that you will achieve the desired results.

Regards,
Nick
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Toshendra
Top achievements
Rank 1
answered on 19 Jun 2009, 08:27 AM
I am more interested in Color variation of summer theme. Can you please provide me a sample to do that.
Also if you supply me Common.Xaml files for default_*  skins then that will be great 
0
Nikolay
Telerik team
answered on 24 Jun 2009, 12:58 PM
Hello Toshendra,

As we mentioned in another ticket you opened - we will work on updating the Summer theme's color variations after the official Q2 launch. We cannot send to you an updated XAML of these color variations at this time.

As for the Common.xaml for the default theme - you can use the Generic.xaml file that comes with our installation.

Hope this helps.

Sincerely yours,
Nick
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Toshendra
Top achievements
Rank 1
answered on 25 Jun 2009, 03:29 PM
Thanks !  Do you have any timescale  when color variation of summer theme is going to be released?
Toshendra
0
Valentin.Stoychev
Telerik team
answered on 03 Jul 2009, 06:44 AM
Hello Toshendra,

We can't give you an exact estimate - we are now polising our plans for the Q3 release and setting the right priorities. In what colors are you interested in?

Best wishes,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Toshendra
Top achievements
Rank 1
answered on 03 Jul 2009, 09:21 AM
Colors demonstrated by your  theme example( default_red,,,,Green)  will do the job for me.

What will be nice is if you have the controls where you set property on the control say ThemeColor="#FFA4E566 and all gradient brushes will adjust according to that color ( I guess I am expecting too much).

0
Valentin.Stoychev
Telerik team
answered on 07 Jul 2009, 07:36 AM
Hi Toshendra,

Thanks for your feedback. I've added 500 Telerik points to your account.

Regards,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Allen
Top achievements
Rank 2
Iron
Veteran
answered on 23 Mar 2011, 10:32 PM
Sorry to lurk here.  Is there any way to just reset the application's appearance all at once at runtime without leaving and returning? 

StyleManager.ApplicationTheme=ThemeManager.FromName('xxxx');  does not update the visual appearance immediately.  What is the trick?
0
Vanya Pavlova
Telerik team
answered on 24 Mar 2011, 10:00 AM
Hello Allen,

 
You may take a look at the following blog post "Changing Silverlight application themes at runtime".

Best wishes,
Vanya Pavlova
the Telerik team
0
Allen
Top achievements
Rank 2
Iron
Veteran
answered on 24 Mar 2011, 11:30 AM
I should have mentioned that I am trying to build a WPF app.  Your example is clear, but the RootVisual property does not appear to exist in App.  My MainWindow is a Window, not a UserControl.
Anything else I need to do?
0
Vanya Pavlova
Telerik team
answered on 24 Mar 2011, 01:31 PM
Hello Vic,

 
I have prepared an example similar to the Silverlight's one for you, where the Window's Content is recreated at runtime.

Please let me know how this works for you.

All the best,
Vanya Pavlova
the Telerik team
0
Allen
Top achievements
Rank 2
Iron
Veteran
answered on 24 Mar 2011, 03:44 PM
I reviewed the example.
I am trying to use commands and the ViewModel approach, not code-behind events.  How do I get the handle of the (graphic) object where Reset_Content is actually a method,  from with my ViewModel?
Thank you.
0
Vanya Pavlova
Telerik team
answered on 27 Mar 2011, 06:06 PM
Hi Vic,

 
The RestContent method simply reloads the content of the parent Window, it is not related to your ViewModel. You may implement your custom routed commands, that will reload the view for each theme in a similar way as it was demonstrated in the previous example.

All the best,
Vanya Pavlova
the Telerik team
Tags
General Discussions
Asked by
Rogério
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Jamest
Top achievements
Rank 2
Eric Schoenholzer
Top achievements
Rank 2
Simon
Top achievements
Rank 1
Sir
Top achievements
Rank 1
Nik
Top achievements
Rank 1
SL
Top achievements
Rank 1
Maarten
Top achievements
Rank 1
David
Top achievements
Rank 1
Vic
Top achievements
Rank 2
yjh
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
yelong
Top achievements
Rank 1
Bobi
Telerik team
Toshendra
Top achievements
Rank 1
Nikolay
Telerik team
Allen
Top achievements
Rank 2
Iron
Veteran
Vanya Pavlova
Telerik team
Share this question
or