Completed
Last Updated: 24 Oct 2016 14:39 by Greg
Yehudah
Created on: 26 Aug 2015 20:26
Category: MaskedInput
Type: Bug Report
2
MaskedInput: DesignTime exception "Can only base on a Style with target type that is base type"
Bug details:
OS: Windows 10.
VS: 2015 professional
Telerik version: 2015.2 SP1

Code sample:
<Window x:Class="RadMaskedInputBug.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                Title="MainWindow">
    <Grid>
        <telerik:RadTextTimeInput />
    </Grid>
</Window>


The designer crashes and shows only the exception:
InvalidOperationException: Can only base on a Style with target type that is base type 'RadMaskedTextInput'.

UPDATE: 
Telerik has submitted a bug report to Microsoft. You can check its progress here: https://connect.microsoft.com/VisualStudio/feedback/details/2005303/designer-error-can-only-base-on-a-style-with-target-type-that-is-base-type-customcontrol-when-a-style-is-basedon-a-style-of-an-abstract-class 
On 21/12/2015 Microsoft commented that a fix has been submitted and will be available in the next update.
13 comments
Greg
Posted on: 15 Jan 2016 23:37
I also have this problem in Windows 10 VS 2013 with NoXaml Binaries.
ADMIN
Petar Mladenov
Posted on: 16 Nov 2015 09:03
We submitted a bug report to Microsoft. You can check it here https://connect.microsoft.com/VisualStudio/feedback/details/2005303/designer-error-can-only-base-on-a-style-with-target-type-that-is-base-type-customcontrol-when-a-style-is-basedon-a-style-of-an-abstract-class 
ADMIN
Petar Mladenov
Posted on: 19 Oct 2015 13:52
Can you please open a new support thread with an isolated project attached ?
This way we would be better able to investigate the issue and prepare a correct description that we can possibly send to Microsoft if needed.
Yehudah
Posted on: 10 Oct 2015 19:43
Hi Petar,
I use ONLY no-xaml binaries.
I tried it again, I deleted the references and added them manually from C:\Program Files (x86)\Telerik\UI for WPF Q2 2015\Binaries.NoXaml\WPF45.
I clean the project [deleted obj and bin folders], and the problem still occurs.
ADMIN
Petar Mladenov
Posted on: 09 Oct 2015 15:53
Hi Yehuda,

We investigated this again before asking Microsoft. 
We only managed to reproduce it if we do the following unsupported operation.
We use Theme xaml files in Theme folder attached to the project. We reference the xaml files in APP.xaml. However, we use XAML DLLS - Teleril.WIndows.Controls.dll and Telerik.Windows.Controls.Input dll. This is the only way to reproduce the exception.

The correct way to use attached xaml files is in cobination with no-xaml binaries. Pelase check this helpa rticle for further information. http://docs.telerik.com/devtools/wpf/styling-and-appearance/styling-apperance-implicit-styles-overview.html 

Could you please confirm this is the exact case in your environment ? Please double check the App.xaml, the binaries and the attached xaml files (if any).
Yehudah
Posted on: 17 Sep 2015 07:23
Petar, thanks for the idea to switch to x86!
I hope Microsoft will fix it.
Yheudah
ADMIN
Petar Mladenov
Posted on: 09 Sep 2015 11:37
We will contact Microsoft about this one.
Additional information we found => when you change the target platform of the application from x64 to x86 the issue is not reproducible.
ADMIN
Petar Mladenov
Posted on: 08 Sep 2015 13:48
Hi Yehudah,

We are currently investigating this one and we managed to reproduce it.
Probably this is a bug in VS 2015 having in mind that it is not reproducible in other visual studio versions and the stacktrace does not include telerik's code.

If applicable in your scenario, as a workaround, you can reference no xaml binaries and theme dll, instead of referencing the xaml files in Theme folder.
Yehudah
Posted on: 07 Sep 2015 14:45
??
Yehudah
Posted on: 03 Sep 2015 16:21
Of course, this is a typo, and I meant RadMaskedDateTimeInput. 
Attached a screenshot, from a new and clean project, after rebuild.
Attached Files:
ADMIN
Martin
Posted on: 03 Sep 2015 15:29
Hi Yehudah

Note that the MaskedInput suite doesn't provide control called RadTextTimeInput. We tested the masked input controls but we weren't able to reproduce the described design time error. This is why I would ask you to prepare an isolated project that demonstrates the issue and send it here in the comments as an attachment. In the meantime you can try to manually delete the "bin" and "obj" folders of the project and then Clean and Rebuild it and see if the issue still occurs.

Regards
Martin Ivanov
Telerik
Yehudah
Posted on: 01 Sep 2015 22:47
?! Nobody encountered this bug ?!
Yehudah
Posted on: 27 Aug 2015 07:05
More environment details:
I'm using implicit styles.
Theme: win8 theme | ExpressionDark theme.