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

How to set dialog theme?

5 Answers 209 Views
FilePathPicker
This is a migrated thread and some comments may be shown as answers.
Ray
Top achievements
Rank 1
Ray asked on 17 Dec 2019, 03:53 PM

We are using the RadFilePathPicker and we can set the theme of the picker control but how do we set the theme of the resulting dialog when the control is opened?  The theme does not seem to carry over.

 

<telerik:RadFilePathPicker DialogType="SaveFile" FilePath="{Binding SaveLocation, Mode=TwoWay}" Margin="0" 
                                               WatermarkContent="No File Selected" VerticalAlignment="Center" Height="30" Grid.Row="4" Grid.Column="1"
                                               telerik:StyleManager.Theme="Office2016Touch"/>          

 

5 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 20 Dec 2019, 11:24 AM

Hi Ray, 

Thank you for the provided code snippet.

I was able to reproduce this behavior on my side. Therefore, I have logged it in our Feedback Portal where you can track its progress. What I can suggest as a workaround is to set the theme to the whole application. You can do that with StyleManager by setting the StyleManager.ApplicationTheme static property before the InitializeComponent(); method.

public MainWindow()
{
    StyleManager.ApplicationTheme = new Office2016TouchTheme();
    InitializeComponent();
}

I hope this approach is applicable to you. In addition, I have updated your Telerik Points for bringing this behavior to our attention.

Regards,
Dinko
Progress Telerik

Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Ray
Top achievements
Rank 1
answered on 20 Dec 2019, 05:00 PM
This will not work for us.  Thanks for logging it though.
0
Dominik
Top achievements
Rank 1
Veteran
Iron
answered on 10 Oct 2020, 04:23 PM

Hello :)

Today i'm updated my solution from telerik 2019 R1 to 2020 R3. Everythink seems to works but, after i try to use RadFilePathPicker in error console i see "Cannot locate resource 'themes/genericoffice2019.xaml'"  application builds without problems but if i click button to select file i see an exception:

System.Windows.Markup.XamlParseException: '„{DependencyProperty.UnsetValue}” is not a valid value for property „BorderBrush”.'

im using Office2016TouchTheme for whole app.

0
Dominik
Top achievements
Rank 1
Veteran
Iron
answered on 11 Oct 2020, 12:32 PM

<Style TargetType="{x:Type telerik:RadNumericUpDown}">
        <Setter Property="Height" Value="32"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="#BDC0C5"/>
    </Style>

    <Style TargetType="{x:Type telerik:RadMaskedNumericInput}">
        <Setter Property="Height" Value="32"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="#BDC0C5"/>
    </Style>

    <Style TargetType="{x:Type telerik:RadMaskedTextInput}">
        <Setter Property="Height" Value="32"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="#BDC0C5"/>
    </Style>

    <Style TargetType="{x:Type TextBox}">
        <Setter Property="Height" Value="32"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="#BDC0C5"/>
    </Style>

    <Style TargetType="{x:Type telerik:RadAutoCompleteBox}">
        <Setter Property="Height" Value="32"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="#BDC0C5"/>
    </Style>

its crazy but my styles brokes it.. only when i use this filepathselector dialog  after i change all border brush setters from

        <Setter Property="BorderBrush" Value="{StaticResource GrayColor2"/>

to

        <Setter Property="BorderBrush" Value="#BDC0C5"/>

 

it works

0
Dinko | Tech Support Engineer
Telerik team
answered on 14 Oct 2020, 12:57 PM

Hello Dominik,

Thank you for the shared custom styles.

I have tested your scenario on my side but wasn't able to get such an exception. Can you check the attached project and let me know what I am missing from your implementation? You can also share the steps performed in your application.

I am looking forward to your reply.

Regards,
Dinko
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/.

Tags
FilePathPicker
Asked by
Ray
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Ray
Top achievements
Rank 1
Dominik
Top achievements
Rank 1
Veteran
Iron
Share this question
or