Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > DatePicker > DatePicker Opacity question

Answered DatePicker Opacity question

Feed from this thread
  • Jarrod avatar

    Posted on Mar 1, 2011 (permalink)

    Hi There,

    I am using the RadDatePicker control to set the date on a column in a RadGridView. The problem I am having is that the control is displaying as transparent, which makes the control hard to use. I have changed the opacity to 100 but it doesn't seem to make a difference.

    I am using the transparent theme for the grid. Is there a way for me to set the opacity of the date control separately? Sorry this is probably a very obvious thing, but I am rather new to Silverlight. I have included a sample of the xaml below.

    Thanks and Regards, J

                            <telerik:GridViewDataColumn DataMemberBinding="{Binding EstimatedCloseDate}" Header="Estimated Close Date" TextAlignment="Center" >
                                <telerik:GridViewDataColumn.CellEditTemplate>
                                    <DataTemplate>
                                        <telerik:RadDatePicker SelectedDate="{Binding EstimatedCloseDate, Mode=TwoWay}" Background="Black" Opacity="100" />
                                    </DataTemplate>
                                </telerik:GridViewDataColumn.CellEditTemplate>
                            </telerik:GridViewDataColumn>
    
    Thanks and Regards, J
    
    
    
    

    Reply

  • Answer Yana Yana admin's avatar

    Posted on Mar 3, 2011 (permalink)

    Hi Jarrod,

    You should set opacity to the calendar in your RadDatePicker, this can be achieved with CalendarStyle property like this:

    - create the style:

    Copy Code
    Copy Code
    Copy Code
    <UserControl.Resources>   
        <Style x:Name="calStyle" TargetType="Control">
            <Setter Property="Opacity" Value="100"  />
        </Style>
    </UserControl.Resources>

    and set it to CalendarStyle:

    Copy Code
    Copy Code
    Copy Code
    <telerik:GridViewDataColumn.CellEditTemplate>
        <DataTemplate>
            <telerik:RadDatePicker Background="Black"  Opacity="100" CalendarStyle="{StaticResource calStyle}" />
        </DataTemplate>
    </telerik:GridViewDataColumn.CellEditTemplate>

    Hope this helps.

    Greetings,
    Yana
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!

    Reply

  • Jarrod avatar

    Posted on Mar 3, 2011 (permalink)

    Hi Yana,

    I have tried this but it has not made a difference. Please see inset code.

    <Style x:Name="calendarStyle" TargetType="Control">
        <Setter Property="Opacity" Value="100"/>
    </Style>

    and 

    <telerik:GridViewDataColumn DataMemberBinding="{Binding EstimatedCloseDate}" Header="Estimated Close Date" TextAlignment="Center" DataFormatString="{} {0:dd, MMM, yyyy}">
        <telerik:GridViewDataColumn.CellEditTemplate>
            <DataTemplate>
                <telerik:RadDatePicker SelectedDate="{Binding EstimatedCloseDate, Mode=TwoWay}" CalendarStyle="{StaticResource calendarStyle}" />
            </DataTemplate>
        </telerik:GridViewDataColumn.CellEditTemplate>
    </telerik:GridViewDataColumn>

    It is still transparent. Please see an example attached.
    Attached files

    Reply

  • Yana Yana admin's avatar

    Posted on Mar 7, 2011 (permalink)

    Hi Jarrod,

    I've tested the approach and it worked as expected at our side,  you can find attached my test files, please download the attachment and give it a try.

    Kind regards,
    Yana
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
    Attached files

    Reply

  • Mark avatar

    Posted on Oct 19, 2011 (permalink)

    Jarrod,

    I was just chasing down the same issue in WPF and the provided code did not solve the issue for me either. What ended up working for me was, in the 'calStyle' styling block, to set the background colour. In my case I set it to 'silver' and the calendar became opaque. (see attachments).

    Cheers,
    Mark.

    Reply

  • Kelly avatar

    Posted on Jan 30, 2012 (permalink)

    I too have tried the code above and in the zip file with no result. I'm using a RadDateTimePicker with the Transparent theme on 2011.3.1227.1040. I set both the CalendarStyle and the ClockStyle using various values, and don't see any difference. The picker opens over a very busy GridView and is pretty much unreadable. As Mark noted, it works if you also set the background, but I don't want to set the background, or I wouldn't have used the transparent style. Is there something else to try to just set the Opacity?

    Thank you,

    Kelly

    Reply

  • Yana Yana admin's avatar

    Posted on Feb 2, 2012 (permalink)

    Hi Kelly,

    I've tested the project with the latest release and it works without a problem.  Please open a support ticket and send us a simplified version of your project where we can observe the issue. Thanks in advance

    Greetings,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Kelly avatar

    Posted on Feb 2, 2012 (permalink)

    Yana, I submitted a project under ticket id 507961. Thanks!

    Reply

  • Yana Yana admin's avatar

    Posted on Feb 3, 2012 (permalink)

    Hello Kelly,

    I've checked the project and you are right - really setting Opacity is not enough to fix the issue with the DatePicker, you should set Background as well.

    Greetings,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > DatePicker > DatePicker Opacity question
Related resources for "DatePicker Opacity question"

Silverlight DatePicker Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]