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
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
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.
<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
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/.