Getting Started with WPF | ComponentOne Studio Edition
Theming / Implicit and Explicit Styles / Using the ImplicitStyleManager
In This Topic
    Using the ImplicitStyleManager
    In This Topic

    The ImplicitStyleManager lets you set styles implicitly in Silverlight as you might in WPF. You can find the ImplicitStyleManger in the System.Windows.Controls.Theming.Toolkit.dll assembly installed with the Silverlight Toolkit.

    To use the ImplicitStyleManager add a reference in your project to the System.Windows.Controls.Theming.Toolkit.dll assembly and add its namespace to the initial UserControl tag as in the following markup:

    Copy Code
    <UserControl xmlns="" 
    x:Class="C1Theming.MainPage" Width="640" Height="480">

    Once you've added the reference and namespace you can use the ImplicitStyleManager in your application. For example, in the following markup a style is added and implicitly implemented:

    Copy Code
    <Grid x:Name="LayoutRoot" Background="White" theming:ImplicitStyleManager.ApplyMode="OneTime">
            <Style TargetType="c1:C1DropDown">
                < Setter Property="Background" Value="Red" />
            < /Style>
        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
            < c1:C1DropDown Margin="5" Content="C1DropDown" Height="30" Width="100"/>
    See Also