Menu Default Style - 2009_1_529

7 posts, 0 answers
  1. Jim
    Jim avatar
    52 posts
    Member since:
    Apr 2009

    Posted 04 Jun 2009 Link to this post

    Hi - 
    I think this is simply a bug and I understand that these controls are not released.  It appears that somewhere between the sl3-413 and the sl3-529 release we lost the default back/fore ground color for the menu.  Previously (in sl2 and sl2-413) the default is a dark gray background with a lighter foreground for the text.

    This is not critical (although if you can easily tell me what to do to fix it I would be ok with that) but I thought you should know for your next release.  If you need help recreating, I am happy to help with that..

    btw: I am nearing the end of my evaluation phase and I want to pass along a "well-done" to you guys.  I haven't used all of the components but so far they have all worked very nicely and have often surprised me by doing cool things beyond my expectations.
  2. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 10 Jun 2009 Link to this post

    Hi Jim,

    You have a sharp eye. We indeed changed the background/foreground color of RadMenu. Our designers team decided to change the colors for better look. I think it is not a problem for you although you can always change this colors by the  Background, Foreground properties or by editing the template.

     Thank you for the good words and if you have more questions we will be glad to help.

    Kind regards,
    Boyan
    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.
  3. DevCraft banner
  4. Jim
    Jim avatar
    52 posts
    Member since:
    Apr 2009

    Posted 15 Jun 2009 Link to this post

    Hi Boyan -

    It appears that getting back to your original colors is harder than I had expected. I am able to set background and foreground, but in this particular style when then mouse hovers over the menu it switches the foreground from white to black.  If I hard-code the colors by setting Background={... } Foreground={...} I loose this very nice effect.

    I am not overly comfortable with completely controlling the template for this control. Is this the only way to accomplish the original look and feel?  If I need to "replace" the template, where could I get the original template?

    Thanks -
  5. Jim
    Jim avatar
    52 posts
    Member since:
    Apr 2009

    Posted 16 Jun 2009 Link to this post

    I was able to find a reasonable template code in the online examples; menu-template.  I was also able to get the menu displaying like I am interested.  The down-side to my approach is that I spent quite a bit of time 'discovering' how the template interacted with the control.

    I am left with two questions:

    1) what is the best approach for discovering a reasonable template layout (and required items) for a control like radmenu.  As you probably know the menu template doesn't work without the <popup> named 'PART_Popup'.  Had I not found the example I would have not been successful.

    2) I cannot get the 'Highlighted' visual state to do anything.  I am not sure how to discover if this visual state is even being used.  I presume this state fires when the mouse hovers over the menu ( and turns it orange in the default ).  If that is the case something is not working for me.  I can change any of the values in the storyboard to anything I desire and the effect is not seen.

     
                            <vsm:VisualState x:Name="Highlighted"
                                <Storyboard> 
                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Bg" Storyboard.TargetProperty="Opacity"
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="1"/> 
                                    </ObjectAnimationUsingKeyFrames> 
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground"
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="#FFFFFFFF"/> 
                                    </ObjectAnimationUsingKeyFrames> 
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="FontSize"
                                        <DiscreteObjectKeyFrame KeyTime="0" Value="48"/> 
                                    </ObjectAnimationUsingKeyFrames> 
                                </Storyboard> 
                            </vsm:VisualState> 


    Thanks for your help with this.
  6. Doug
    Doug avatar
    22 posts
    Member since:
    Apr 2009

    Posted 16 Jun 2009 Link to this post

    I too need to modify the templates, I'm using Blend and it doesn't expose the default styles for us to edit?  How do we get those?
  7. Dimitrina
    Admin
    Dimitrina avatar
    442 posts

    Posted 18 Jun 2009 Link to this post

    Hello,

    You can make a custom theme for the controls you want. For more information you can visit this link: http://www.telerik.com/help/silverlight/radcontrols-silverlight-edit-theme-brushes.html.

    About question for  VisualState  x:Name="Highlighted"  :

    Now, you can edit the foreground of the text as now we are using ContentPresenter instead of ContenControl. There are several reasons why we decided to use ContentPresenter instead of ContentControl:

                    1)  The ContentControl does not allow to inherit  the  Foreground

                    2)  Once changed, the ContentControl's ForeGround cannot be rebound to the RadMenuItem's
                          ForeGround. Hence the RadMenuItem's ForeGround cannot be changed at runtime

    Please let us know if you have other questions.


    Regards,
    Dimitrina
    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.
  8. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 18 Jun 2009 Link to this post

    Hello,

    You can make a custom theme for the controls you want. For more information you can visit this link: http://www.telerik.com/help/silverlight/radcontrols-silverlight-edit-theme-brushes.html.

    About question for  VisualState  x:Name="Highlighted"  :

    Now, you can edit the foreground of the text as now we are using ContentPresenter instead of ContenControl. There are several reasons why we decided to use ContentPresenter instead of ContentControl:

                    1)  The ContentControl does not allow to inherit  the  Foreground

                    2)  Once changed, the ContentControl's ForeGround cannot be rebound to the RadMenuItem's
                          ForeGround. Hence the RadMenuItem's ForeGround cannot be changed at runtime

    Please let us know if you have other questions.


    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.
Back to Top
DevCraft banner