Here is the beginnings of our telerik standards code. I will then show you our .aspx and our .aspx.vb calls. You can see how wehandle the calendar control because of Metro touch issues. One change and all is well.
Imports Telerik.Web.UI
Imports utility
''' <summary>
''' Public class with utiltiy methods for asp.net web application
''' </summary>
''' <remarks></remarks>
Public Class AspNetUtilities
''' <summary>
''' Method for setting commonly used properties of Rad Date Picker.
''' </summary>
''' <param name="radDatePicker"></param>
''' <remarks></remarks>
Public Shared Sub SetRadDatePickerDefaults(ByRef radDatePicker As RadDatePicker)
radDatePicker.MinDate = DateTime.Parse("1/1/1963")
radDatePicker.MaxDate = DateTime.Parse("6/6/2079")
' When telerik bug in IE 6 fixed, set EnableShadows to true
radDatePicker.EnableShadows = False
radDatePicker.ToolTip = "Open the calendar popup"
radDatePicker.ShowPopupOnFocus = False
radDatePicker.PopupDirection = CType("11", DatePickerPopupDirection)
radDatePicker.EnableScreenBoundaryDetection = True
If LCase(Convert.ToString(safeSession("SkinName"))) = "metrotouch" Then
radDatePicker.Width = Unit.Pixel(135)
Else
radDatePicker.Width = Unit.Pixel(100)
End If
End Sub
' .aspx call for calendar
<telerik:RadDateTimePicker ID="dpMAEventDate" runat="server"></telerik:RadDateTimePicker>
' .aspx.vb call to load control with defaults
AspNetUtilities.
SetRadDatePickerDefaults(dpMAEventDate)
If you need to override or add any additional options to Control, just add after the .aspx.vb call.
I truly wish Telerik would provide better documentation to best practices for Metro Touch and tablets. I see this as just another , we provide options and you figure it out. However this approach is best approach to consistency in your controls, single place to make changes, and fix issues as they occur.
Respectfully, Tre'