Imlicit Style

1 Answer 92 Views
TimePicker
Daniel
Top achievements
Rank 1
Silver
Bronze
Daniel asked on 11 Apr 2022, 07:56 AM

Hi,

I used this link : https://docs.telerik.com/devtools/maui/controls/timepicker/styling/dropdown-styling

to style (implicit style)  for window my RadTimePicker , but is not working.

I attached demo.

Thanks in advance,

P.S

In Doc dropDownViewStyle is missing.

 

Daniel
Top achievements
Rank 1
Silver
Bronze
commented on 11 Apr 2022, 07:59 AM

What should I used dropdown or popup ?

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 11 Apr 2022, 01:38 PM

Hello Daniel,

Thank you for sending the solution. This is the same issue we discussed in the other thread about DatePicker  - https://www.telerik.com/forums/implicit-style.

In short, there is an issue in the picker controls when setting format properties through implicit styles, I logged a bug report on your behalf regarding this in the feedback portal, you can track its status here:

Pickers: Format properties cannot be set through implicit style

In the case of TimePicker - you would need to set DisplayStringFormat property directly to the TimePicker instance. 

As to the other issue - here is a sample  DropDownViewStyle you can use:

 

<Style TargetType="telerikInput:PickerDropDownContentView" x:Key="dropDownViewStyle">
    <Setter Property="BackgroundColor" Value="#D8D8D8"/>
</Style>

I am going to add it to the article, thanks for pointing this out.

As to the last question - TimePicker as well as the other Picker controls provides DropDown and Popup picker mode, you can choose which one to use according to your requirements. By default, DropDown is used for Desktop (Windows, MacOS) and Popup is used for mobile (Android, iOS).

Regards,
Yana
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Daniel
Top achievements
Rank 1
Silver
Bronze
commented on 11 Apr 2022, 05:40 PM

How  do I  change the position of ok and cancel buttons ?

I want ok be right and cancel left.

Yana
Telerik team
commented on 12 Apr 2022, 11:52 AM

For the "Ok" and "Cancel" buttons we're following the platforms recommendations, so by default only on Windows "Ok" is on the left and "Cancel" is on the right,  in the other platforms it's the reversed way. You can check the difference in the screenshots in the TimePicker: Picker Mode topic.

Still, if you need to change buttons' location, you would need to modify the FooterTemplate of the PickerDropDownSettings - I've modified the previously attached example to show you the exact approach.  I added as a comment the default ControlTemplate, for a reference.

Please download the attachment and give it a try. Let me know if you have any additional questions on this.

Daniel
Top achievements
Rank 1
Silver
Bronze
commented on 12 Apr 2022, 12:16 PM

Its ok.

I used this the FooterTemplate of the PickerDropDownSettings for all kinds of pickers: date. datetime. time, list picker.

Tags
TimePicker
Asked by
Daniel
Top achievements
Rank 1
Silver
Bronze
Answers by
Yana
Telerik team
Share this question
or