RadDateTimePicker not work in RadGanttView

1 Answer 159 Views
GanttView TimePicker
onduty
Top achievements
Rank 1
onduty asked on 12 Aug 2021, 03:35 AM | edited on 13 Aug 2021, 09:00 AM

I use RadDateTimePicker  in GanttView like the example "GanttView ", but the theme not work.

My themes is windows8, but not work in RadDateTimePicker .

my xaml is:

       <telerik:RadGanttView x:Name="ganttview" TasksSource="{Binding Tasks}" BorderBrush="#FFD6D4D4"
				BorderThickness="1 0 1 1" SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
				VisibleRange="{Binding VisibleRange}" HighlightedItemsSource="{Binding HighlightedItems}" Grid.Row="1"
				Margin="0 6 0 0"
				PixelLength="{Binding PixelLenght, Mode=TwoWay}">
            <telerik:RadGanttView.Columns>
                <telerik:TreeColumnDefinition Header="Title" MemberBinding="{Binding Title}" Width="240">
                    <telerik:TreeColumnDefinition.CellEditTemplate>
                        <DataTemplate>
                            <TextBox Text="{Binding Title, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" telerik:TouchManager.TouchMode="None" />
                        </DataTemplate>
                    </telerik:TreeColumnDefinition.CellEditTemplate>
                </telerik:TreeColumnDefinition>
                <telerik:ColumnDefinition MemberBinding="{Binding Start}" Header="Start" Width="120">
                    <telerik:ColumnDefinition.CellEditTemplate>
                        <DataTemplate>
                            <telerik:RadDateTimePicker SelectedValue="{Binding Start, Mode=TwoWay}" />
                        </DataTemplate>
                    </telerik:ColumnDefinition.CellEditTemplate>
                </telerik:ColumnDefinition>
                <telerik:ColumnDefinition MemberBinding="{Binding End}" Header="End" Width="120">
                    <telerik:ColumnDefinition.CellEditTemplate>
                        <DataTemplate>
                            <telerik:RadDateTimePicker SelectedValue="{Binding End, Mode=TwoWay}" />
                        </DataTemplate>
                    </telerik:ColumnDefinition.CellEditTemplate>
                </telerik:ColumnDefinition>
                <telerik:ColumnDefinition MemberBinding="{Binding Progress}" Header="Progress" Width="AutoHeaderAndContent">
                    <telerik:ColumnDefinition.CellEditTemplate>
                        <DataTemplate>
                            <telerik:RadNumericUpDown Value="{Binding Progress, Mode=TwoWay}" CustomUnit="%" Minimum="0"
									Maximum="100" telerik:TouchManager.TouchMode="None" />
                        </DataTemplate>
                    </telerik:ColumnDefinition.CellEditTemplate>
                </telerik:ColumnDefinition>
                <telerik:ColumnDefinition MemberBinding="{Binding IsMilestone}" Header="IsMilestone" Width="100" />
            </telerik:RadGanttView.Columns>
        </telerik:RadGanttView>

 

Thanks for your help

Stenly
Telerik team
commented on 16 Aug 2021, 11:26 AM

I have created a sample project which is as close as in the provided image, but I could not recreate the mentioned issue, as it works correctly on my end. I have attached the project that I used for testing. So, could you edit it to match the behavior on your end and send it back?

onduty
Top achievements
Rank 1
commented on 17 Aug 2021, 08:16 AM

Hi Stenly

That's my code. I want to use Windows8 theme.

 

Thanks~

 

1 Answer, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 19 Aug 2021, 12:11 PM

Hello Onduty,

To fix this behavior, just add the following ResourceDictionary for the Telerik.Windows.Controls.Input dll in the App.xaml file. It should look as follows:

<ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.Input.xaml" />

On to the observed behavior, the RadDateTimePicker control was visualized with the default theme, which is Office_Black. That is because the provided project uses the Xaml binaries. And the rest of the controls are being set with the Implicit Styles approach, which is used when the project refers to the NoXaml binaries. What I could recommend in the current scenario, is to use the NoXaml dlls and add the aforementioned ResourceDictionary.

More generally speaking, there are 2 ways to set a theme when using our products and they are:

  • using Style Manager (this approach is recommended when using the NoXaml binaries and their location is inside the Binaries.NoXaml folder)
  • using Implicit Styles (this approach is recommended when using Xaml binaries and they are inside the Binaries folder)

Finally, I have attached the provided project, which I modified to use the NoXaml assemblies and with the added ResourceDictionary.

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

onduty
Top achievements
Rank 1
commented on 25 Aug 2021, 06:19 AM

thanks Stenly
Tags
GanttView TimePicker
Asked by
onduty
Top achievements
Rank 1
Answers by
Stenly
Telerik team
Share this question
or