This is a migrated thread and some comments may be shown as answers.

RadDataPicker Null Reference Exception in Blend 4

1 Answer 46 Views
DatePicker and DateSelector
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Flex
Top achievements
Rank 1
Flex asked on 10 Jun 2011, 01:33 PM

I using the RadDatePicker,  if I set the "CancelButtonIconUri" and "OKButtonIconUri" I get a NullReferenceException.
There is also not possible to change the button text on the settings

<telerikInput:RadDatePicker FontSize="21.333" Foreground="#FF1A89DE" EmptyContent="Datum wählen" Height="43" Margin="-4,-8,0,0" CancelButtonIconUri="/icons/appbar.cancel.rest.png" OkButtonIconUri="/icons/appbar.check.rest.png"/>

I also tried the whole set in a template. Then it don't show a exception but it is still not displayed the correct icons or text.

I
tried it with the current version of the controller and also with the beta Q2.


Any Ideas?

1 Answer, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 15 Jun 2011, 01:27 PM
Hi Flex,

 Thank you for writing.

We are aware of an issue that is related to the Silverlight Pivot control which causes the OnApplyTemplate() method to be called twice on controls. The first time it is called, no template children can be resolved for unclear reasons and if a property is set before the second OnApplyTemplate() call is made, the controls will not function properly because the ControlTemplate has not yet provided the necessary template parts, that is, the control is not in a valid state yet. The only thing that we could do on our side is to suppress the exception so that there are no error messages in Blend or Visual Studio but the control may still not work properly.

In order to set the text for the buttons you must use the localization features of RadControls for WP7. The buttons text is a localizable resource and is therefore specified by external resource files(or through code) which provide values for their specific culture. Please have a look at the online documentation for details. What you will need to provide are values for the OkButtonText and CancelButtonText keys.

Please write again if you need further assistance.

Regards,
Victor
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
DatePicker and DateSelector
Asked by
Flex
Top achievements
Rank 1
Answers by
Victor
Telerik team
Share this question
or