Hi.
I is not accustomed to writing in English. Therefore, it can be difficult to read the Thread. Please understand.
RadComboBox and RadTimePicker use, the program being developed, I have a problem.
My program, RadComboBox selection index is used to change the value TimeInterval of RadTimePicker.
XMAL code below, I have been using is normally. Assembly version is the 2010.1.603.35
<
Window
x:Class
=
"TimePicker_Test.Window1"
xmlns:sys
=
"clr-namespace:System;assembly=mscorlib"
xmlns:telerikStyle
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:telerik
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
xmlns:telerikPanel
=
"clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
xmlns:telerikInput
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
Title
=
"MainWindow"
Height
=
"350"
Width
=
"525"
>
<
Window.Resources
>
<
ResourceDictionary
>
<
sys:TimeSpan
x:Key
=
"timespan_5min"
>
0:5:0
</
sys:TimeSpan
>
<
sys:TimeSpan
x:Key
=
"timespan_hour"
>
1:0:0
</
sys:TimeSpan
>
<
Style
x:Key
=
"ui_TimePicker"
TargetType
=
"{x:Type telerikInput:RadTimePicker}"
>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding ElementName=ui_RadComboBox, Path=SelectedIndex}"
Value
=
"0"
>
<
Setter
Property
=
"TimeInterval"
Value
=
"{StaticResource timespan_5min}"
/>
</
DataTrigger
>
<
DataTrigger
Binding
=
"{Binding ElementName=ui_RadComboBox, Path=SelectedIndex}"
Value
=
"1"
>
<
Setter
Property
=
"TimeInterval"
Value
=
"{StaticResource timespan_hour}"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
<!--RadTimePicker ScrollBar-->
<
LinearGradientBrush
x:Key
=
"HeaderBackgroundBrush"
EndPoint
=
"0.5,1"
StartPoint
=
"0.5,0"
>
<
GradientStop
Color
=
"#FFF8F8F9"
Offset
=
"0"
/>
<
GradientStop
Color
=
"#FFDBDEE1"
Offset
=
"1"
/>
<
GradientStop
Color
=
"#FFDFE2E5"
Offset
=
"0.4"
/>
<
GradientStop
Color
=
"#FFC7CBD1"
Offset
=
"0.4"
/>
</
LinearGradientBrush
>
<
LinearGradientBrush
x:Key
=
"BorderOuterColor"
EndPoint
=
"0.714,1.292"
StartPoint
=
"0.318,0.068"
>
<
GradientStop
Color
=
"#FFdbdcde"
Offset
=
"0.39079609253679837"
/>
<
GradientStop
Color
=
"#FFc6c7c8"
Offset
=
"1"
/>
</
LinearGradientBrush
>
<
SolidColorBrush
x:Key
=
"HeaderForegroundBrush"
Color
=
"#FF000000"
></
SolidColorBrush
>
<
SolidColorBrush
x:Key
=
"ContentBackgroundBrush"
Color
=
"#f0f1f2"
/>
<
SolidColorBrush
x:Key
=
"HeaderBackgroundBrush11"
Color
=
"#FFFFFFFF"
/>
<
Style
x:Key
=
"HeaderContentStyle"
TargetType
=
"ContentControl"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"ContentControl"
>
<
Grid
x:Name
=
"RootElement"
Margin
=
"0"
Background
=
"Transparent"
>
<
Rectangle
Fill
=
"Transparent"
/>
<
ContentPresenter
x:Name
=
"buttonContent"
HorizontalAlignment
=
"Center"
Margin
=
"{TemplateBinding Padding}"
RenderTransformOrigin
=
"0.5,0.5"
VerticalAlignment
=
"Center"
/>
</
Grid
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
<
Style
x:Key
=
"ui_Clock"
TargetType
=
"telerikInput:RadClock"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"telerikInput:RadClock"
>
<
Border
BorderBrush
=
"{TemplateBinding BorderBrush}"
BorderThickness
=
"{TemplateBinding BorderThickness}"
Background
=
"{TemplateBinding Background}"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"30"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<!--Header background: -->
<
Border
Background
=
"{StaticResource HeaderBackgroundBrush}"
BorderBrush
=
"{StaticResource BorderOuterColor}"
BorderThickness
=
"0 0 0 1"
>
<
ContentControl
x:Name
=
"button"
Content
=
"{TemplateBinding Header}"
ContentTemplate
=
"{TemplateBinding HeaderTemplate}"
HorizontalAlignment
=
"Center"
Grid.Row
=
"0"
Foreground
=
"{StaticResource HeaderForegroundBrush}"
Style
=
"{StaticResource HeaderContentStyle}"
/>
</
Border
>
<
ScrollViewer
MaxHeight
=
"200"
Grid.Row
=
"1"
>
<
ItemsPresenter
x:Name
=
"ItemsPresenter"
></
ItemsPresenter
>
</
ScrollViewer
>
</
Grid
>
</
Border
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
<
Setter
Property
=
"Header"
Value
=
"Clock"
/>
<
Setter
Property
=
"ItemsPanel"
>
<
Setter.Value
>
<
ItemsPanelTemplate
>
<
telerikPanel:RadUniformGrid
x:Name
=
"uniformGrid"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
/>
</
ItemsPanelTemplate
>
</
Setter.Value
>
</
Setter
>
<
Setter
Property
=
"ItemTemplate"
>
<
Setter.Value
>
<
DataTemplate
>
<
Border
x:Name
=
"Borderarea"
VerticalAlignment
=
"Center"
>
<
TextBlock
x:Name
=
"ContentText"
TextAlignment
=
"Center"
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Center"
Text
=
"{Binding}"
Margin
=
"5 2 5 2"
/>
</
Border
>
</
DataTemplate
>
</
Setter.Value
>
</
Setter
>
<
Setter
Property
=
"Background"
Value
=
"{StaticResource ContentBackgroundBrush}"
/>
<
Setter
Property
=
"Margin"
Value
=
"0"
/>
<
Setter
Property
=
"BorderBrush"
Value
=
"{StaticResource BorderOuterColor}"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"1"
/>
<
Setter
Property
=
"StartTime"
Value
=
"0:0:0"
/>
<
Setter
Property
=
"EndTime"
Value
=
"23:59:0"
/>
<
Setter
Property
=
"TimeInterval"
Value
=
"1:0:0"
/>
</
Style
>
</
ResourceDictionary
>
</
Window.Resources
>
<
Grid
>
<
StackPanel
>
<
telerikInput:RadComboBox
x:Name
=
"ui_RadComboBox"
SelectedIndex
=
"0"
>
<
telerikInput:RadComboBoxItem
Content
=
"5Minute"
/>
<
telerikInput:RadComboBoxItem
Content
=
"Hour"
/>
</
telerikInput:RadComboBox
>
<
telerikInput:RadTimePicker
Culture
=
"en-US"
Style
=
"{StaticResource ui_TimePicker}"
>
</
telerikInput:RadTimePicker
>
</
StackPanel
>
</
Grid
>
</
Window
>
I recently updated to the Assembly version was 2010.2.812.40.
Use this code in the updated version, there is a problem.
First, RadTimePicker Dropdown Item When we do not display properly spaced
This was resolved by specifying ClockSyle. In previous versions, but was not required to specify
<
telerikInput:RadTimePicker
Culture
=
"en-US"
Style
=
"{StaticResource ui_TimePicker}"
ClockStyle
=
"{StaticResource ui_Clock}"
/>
Second, RadComboBox changes in the selected index when using DataTrigger RadTimePicker tries to change the value of the TimeInterval.
In previous versions of normal, respectively. However, the updated version does not change the value.
Which part is the problem, but I do not know many tests.
To using this code is wrong? Or, there is a problem with the updated version?
I can not find the correct answer, writes Thread.
Wait for an answer. Thanks.