Remove MouseOver Color in RadDatePicker

6 posts, 0 answers
  1. Balaji
    Balaji avatar
    12 posts
    Member since:
    Mar 2011

    Posted 20 May 2011 Link to this post

    Hi,
    I am using RadDatePicker i need to remove the mouseover (orange) into  green color.
    Pls help me



    Thanks in ADVANCE


    regards
    Balaji
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 24 May 2011 Link to this post

    Hello Balaji,

    Thank you for the screenshot.

    You can do this very easily in Expression Blend. Just drop a DatePicker control into the design surface, right-click it and choose from the menu Edit Additional Templates->Edit CalendarStyle ->Edit a Copy. Then go to Object-> Edit Additional Styles -> Edit CalendarStyle. Then again Object-> Edit Additional Styles -> Edit DayButtonStyle -> Edit a Copy. Blend will generate all the needed resources, so you will be able to customize the button to fit your requirements.
    You might also need to edit the SelectionChrome element, which is represented from a ButtonChrome control. How to edit the ButtonChrome control you can find more information in this KB article. The link is for WPF, but the same logic applies and instead of Triggers we use VisualStates in Silverlight.

    Hope this information is helpful.

    Kind regards,
    Konstantina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Balaji
    Balaji avatar
    12 posts
    Member since:
    Mar 2011

    Posted 27 May 2011 Link to this post

    Hi,

    thanks for reply

    Actually my problem is on MouseOver the  IsNotFromCurrentView Dates are retains its mouseover color .After mouseout that still retains in that particular dates.But for other dates working prefectly .I need to remove that color.I have attached  screenshot also.
    pls help me..




    Regards
    Balaji
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 01 Jun 2011 Link to this post

    Hello Balaji,

    Thank you for the screenshot.

    I am afraid I cannot understand you completely. Whichever color you need to change you will have to edit the VisualStates of the ButtonChrome. Could you please be more specific what exactly are you trying to achieve. If you send us some more details it will be very helpful.

    Looking forward to your reply.

    Regards,
    Konstantina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Kenya
    Kenya avatar
    3 posts
    Member since:
    Nov 2011

    Posted 29 Nov 2011 Link to this post

    Hi I am trying to do the same thing. My hierarchy seems to be different. I'm using Blend 4. I can get to ButtonChrome easily. Any suggestions? Thanks.
  7. Balaji
    Balaji avatar
    12 posts
    Member since:
    Mar 2011

    Posted 29 Nov 2011 Link to this post

    hi,

    Edit the butttom chrome template Then you will get this

    <Style x:Key="ButtonChrome" TargetType="Telerik_Windows_Controls_Chromes:ButtonChrome">
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="BorderBrush" Value="{StaticResource HeaderButtonOuterBorder_Normal}"/>
            <Setter Property="Background" Value="{StaticResource HeaderButtonBackground_Normal}"/>
            <Setter Property="CornerRadius" Value="{StaticResource SplitButton_SpanCornerRadius_Cal}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Telerik_Windows_Controls_Chromes:ButtonChrome">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="OuterBorder">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonOuterBorder_MouseOver}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="InnerBorder">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonInnerBorder_MouseOver}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="OuterBorder">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonBackground_MouseOver}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>

                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="OuterBorder">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonOuterBorder_Pressed}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="InnerBorder">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonInnerBorder_Pressed}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="OuterBorder">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonBackground_Pressed}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}">
                                <Border x:Name="InnerBorder" BorderBrush="{StaticResource HeaderButtonInnerBorder_Normal}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}"/>
                            </Border>
                        </Grid>
                    </ControlTemplate>

                </Setter.Value>
            </Setter>
        </Style>


    In the <VisualState x:Name="MouseOver">,you can apply the color u like..
Back to Top
DevCraft banner