Implicit Themes on UserControl

6 posts, 0 answers
  1. Patrick
    Patrick avatar
    42 posts
    Member since:
    Jul 2012

    Posted 24 Apr 2013 Link to this post

    I am using Implicit Themes in my WPF app, like so:
    <Application x:Class="Green.App"
        xmlns:local="clr-namespace:Green">
        <Application.Resources>
          <ResourceDictionary>
                <ResourceDictionary.MergedDictionaries>
                    <ResourceDictionary>
                        <local:AppBootstrapper x:Key="bootstrapper" />
                    </ResourceDictionary>
                    <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.Input.xaml"/>
                    <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
                </ResourceDictionary.MergedDictionaries>
            </ResourceDictionary>
        </Application.Resources>
    </Application>

    It doesn't seem to be applying to User Controls that I create, do I need to do something different?  I noticed here -->Implicit Styles that it references using the "Themes.Implicit" folder...

    I did what I have shown above and added a reference to "Telerik.Windows.Themes.Windows8", the No Xaml version.
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 26 Apr 2013 Link to this post

    Hello Patrick,

     

    I believe that the following forum thread will answer to your questions.
    Please give it a try and if you need any additional information do not hesitate to contact us!



    Kind regards,
    Vanya Pavlova
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Patrick
    Patrick avatar
    42 posts
    Member since:
    Jul 2012

    Posted 01 May 2013 Link to this post

    Hi Vanya,
    Thanks for the help.  It looks like the thread you linked is actually what I am already doing.  I realize now that I asked my question very poorly.  I have included a screenshot as an attachment to help illustrate.  I was trying to illustrate that in the Designer my User Controls are all black.  Very hard to read.  When you run the App they are themed properly but it is more than a little annoying trying to work with them in the Designer this way.

    Thoughts?
  5. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 01 May 2013 Link to this post

    Hi Patrick,




    Our themes do not support styles for plain TextBlock, by that reason the text elements are difficult to read.
    For the time being I may suggest you to manually set the Foreground of the TextBlock to a color appropriate for the represented color scheme (something like #FFDDDDDD).
    Hope this helps!


    Regards,
    Vanya Pavlova
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Patrick
    Patrick avatar
    42 posts
    Member since:
    Jul 2012

    Posted 01 May 2013 Link to this post

    Thanks Vanya, good to know except I'm not using any TextBlocks...  Below is the complete XAML of the screenshot I attached to my last post.  As you could tell from the screenshot, the UserControl is all Black as well and almost every other control in the Designer only.

    <UserControl x:Name="CreateAuthUserControl" x:Class="Green.Views.CreateAuthView"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                 xmlns:cal="http://www.caliburnproject.org"
                 MinWidth="450" Width="450" Height="400">
        <StackPanel>
            <telerik:RadExpander Header="Client Information" IsExpanded="True">
                <UniformGrid Columns="4">
                    <telerik:Label Content="Last Name" />
                    <TextBox x:Name="LastName" IsReadOnly="True"  />
                    <telerik:Label Content="First Name" />
                    <TextBox x:Name="FirstName" IsReadOnly="True" />               
                    <telerik:Label Content="MaID" />
                    <TextBox x:Name="MaID" IsReadOnly="True" />
                    <telerik:Label Content="Social Worker" />
                    <TextBox x:Name="AssignedSocialWorker" IsReadOnly="True"  />
                    <telerik:Label Content="Authorization #" />
                    <TextBox x:Name="AuthorizationNumber" IsReadOnly="True"  />               
                    <telerik:Label Content="MCP Review Date" />
                    <TextBox x:Name="MCPReviewDate" IsReadOnly="True" />
                </UniformGrid>
            </telerik:RadExpander>
            <telerik:GroupBox Header="Service Selection">           
                <UniformGrid Columns="4">
                    <telerik:RadWatermarkTextBox WatermarkContent="Enter Code" />
                    <telerik:RadButton Content="Advanced Search"  />
                    <telerik:Label Content="Service Type" />
                    <telerik:RadComboBox x:Name="ServiceType" />
                     
                </UniformGrid>
            </telerik:GroupBox>
            <telerik:GroupBox Header="Provider Selection">
                <UniformGrid Columns="4">
                    <telerik:Label Content="Service Providers" />
                    <telerik:RadComboBox x:Name="ServiceProviders" />
                </UniformGrid>
            </telerik:GroupBox>
            <telerik:GroupBox Header="Authorization Details">
                <UniformGrid Columns="4">
                    <telerik:Label Content="Start Date" />
                    <telerik:RadDatePicker x:Name="AuthorizationStartDate" />
                    <telerik:Label Content="End Date" />
                    <telerik:RadDatePicker x:Name="EndDate" />
                </UniformGrid>
            </telerik:GroupBox>
        </StackPanel>
    </UserControl>
  7. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 01 May 2013 Link to this post

    Hi Patrick,



    Please check this thread "Telerik Theme at design time" for further reference, where the same topic had been already discussed.


     

    All the best,
    Vanya Pavlova
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready