Calendar with Office 2013 theme

6 posts, 1 answers
  1. Alex R.
    Alex R. avatar
    8 posts
    Member since:
    Dec 2011

    Posted 27 Jan 2014 Link to this post

    My calendar, see attached image, when setting the theme to Office 2013 loses some of the key styling.  The days seem to be missing, selected range doesn't show any highlighting, and the current day is not formatting the day fore color.

    Any assistance would be greatly appreciated.



    <UserControl.Resources>
        <ResourceDictionary>
            <telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
      
            <DataTemplate x:Name="cFontTemplate"
                      x:Key="cFontTemplateKey">
                <TextBlock Text="{Binding Text}"
                       Foreground="Black"
                       FontWeight="ExtraBold" />
            </DataTemplate>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml"/>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml"/>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Input.xaml"/>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Docking.xaml"/>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.RibbonView.xaml"/>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.GridView.xaml"/>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Chart.xaml"/>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
  2. Alex R.
    Alex R. avatar
    8 posts
    Member since:
    Dec 2011

    Posted 27 Jan 2014 in reply to Alex R. Link to this post

    I am also having the same issue with the ribbon view
  3. UI for WPF is Visual Studio 2017 Ready
  4. Alex R.
    Alex R. avatar
    8 posts
    Member since:
    Dec 2011

    Posted 27 Jan 2014 in reply to Alex R. Link to this post

    As a side note this is a user control, not wpf application.
  5. Answer
    Masha
    Admin
    Masha avatar
    355 posts

    Posted 29 Jan 2014 Link to this post

    Hi Alex,

    The problem with missing brushes and visual states comes from the fact that Palettes ResourceDictionaries doesn’t get initialized when implicit styles are added as resources in Window.Resources or UserControl.Resources collection.

    To make this work when you are merging the implicit style files locally, you’ll have to initialize the corresponding theme ResourceDictionary in App.xaml for example:

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <telerik:Office2013ResourceDictionary />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>

    Another solution is to merge ResourceDictionaries in code behind like in the attached sample project.

    I hope this will be helpful.

    Regards,
    Masha
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  6. Alex R.
    Alex R. avatar
    8 posts
    Member since:
    Dec 2011

    Posted 29 Jan 2014 in reply to Masha Link to this post

    Hello Masha,

    For this particular instance there is no WPF Application to set the application resources.  My main application is written in C++ and wraps the WPF User Control to display as a native widow. 

    I have submitted a ticket as well with more details of my issue, including the C++ code launching the window.

    Ticket 781437
  7. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 03 Feb 2014 Link to this post

    Hi Alex,

    Thank you, we will check the ticket.

    Regards,
    Yana
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
UI for WPF is Visual Studio 2017 Ready