ok guys so I can't seem to be able to apply your themes to a specific control, I used the link provided from you guys to do so http://www.telerik.com/help/silverlight/common-styling-apperance-setting-theme.html#Setting_Instance-Specific_Built-In_Theme_in_XAML , unless i do it in the code behide like so:
the problem is that i want to be able to edit the vista theme, and for that it needs to be applied in the xaml file i believe, so i can use expression blend to edit the theme styles like MouseOver and so on.
here is the code that does not work:
xaml
when using code behind, i remove the telerik:StyleManager.Theme="Vista" xaml from mySlider and try the following:
note: on the reference I do have the assemblies added, hence it works when I do this:
but thats not what I want, I'm using VS2010 and expression blend 4 RC
please help, and thanks
public partial class MainPage : UserControl |
{ |
public MainPage() |
{ |
StyleManager.ApplicationTheme = new VistaTheme(); |
InitializeComponent(); |
} |
} |
the problem is that i want to be able to edit the vista theme, and for that it needs to be applied in the xaml file i believe, so i can use expression blend to edit the theme styles like MouseOver and so on.
here is the code that does not work:
xaml
<UserControl x:Class="edittheme.MainPage" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" |
mc:Ignorable="d" |
d:DesignHeight="300" d:DesignWidth="400"> |
<Grid x:Name="LayoutRoot" Background="White"> |
<telerik:RadSlider x:Name="mySlider" telerik:StyleManager.Theme="Vista" VerticalAlignment="Center"></telerik:RadSlider> |
</Grid> |
</UserControl> |
when using code behind, i remove the telerik:StyleManager.Theme="Vista" xaml from mySlider and try the following:
using System; |
using System.Collections.Generic; |
using System.Linq; |
using System.Net; |
using System.Windows; |
using System.Windows.Controls; |
using System.Windows.Documents; |
using System.Windows.Input; |
using System.Windows.Media; |
using System.Windows.Media.Animation; |
using System.Windows.Shapes; |
using Telerik.Windows.Controls; |
namespace edittheme |
{ |
public partial class MainPage : UserControl |
{ |
public MainPage() |
{ |
InitializeComponent(); |
StyleManager.SetTheme(mySlider, new VistaTheme()); |
} |
} |
} |
note: on the reference I do have the assemblies added, hence it works when I do this:
using System; |
using System.Collections.Generic; |
using System.Linq; |
using System.Net; |
using System.Windows; |
using System.Windows.Controls; |
using System.Windows.Documents; |
using System.Windows.Input; |
using System.Windows.Media; |
using System.Windows.Media.Animation; |
using System.Windows.Shapes; |
using Telerik.Windows.Controls; |
namespace edittheme |
{ |
public partial class MainPage : UserControl |
{ |
public MainPage() |
{ |
StyleManager.ApplicationTheme = new VistaTheme(); |
InitializeComponent(); |
} |
} |
} |
but thats not what I want, I'm using VS2010 and expression blend 4 RC
please help, and thanks