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

Custom control derived from RadCombobox errors in Expression Blend

3 Answers 138 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
DOUG
Top achievements
Rank 1
DOUG asked on 06 Jun 2011, 06:06 PM
I have created a custom control derived from RadCombobox. It compiles and runs fine in Visual Studio. But if I use Expression Blend to view a screen containing my custon control, I receive a design time error stating "Object reference not set to an instance of an object". This happens even if the derived class contains an insignificant amount of code. If I place RadCombobox directly on the screen (e.g. without wrapping it in a custom control), it shows up fine.

Here is my custom control:
    public class ccComboBox : RadComboBox
    {
        public int i;
    }

Here is my xaml:
    <Grid>
        <StackPanel>
            <telerik:RadComboBox Height="30" Width="200" Background="LightBlue"/>
            <cc:ccComboBox Height="30" Width="200" Background="LightBlue"/>
            <cc:ccDatePicker />
        </StackPanel>
    </Grid>

Only the ccComboBox xaml causes the error. ccDatePicker is derived from RadDatePicker and works fine.

Any help is greatly appreciated.

Doug

3 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 08 Jun 2011, 10:40 AM
Hi DOUG,

What version of RadControls for WPF are you using? What's the .NET version of your application (3.5 or 4)?

I created a very simple application that seems to work fine in both Visual Studio 2010 and Blend 4, please, find it attached. Let me know if I am missing something.

All the best,
Valeri Hristov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
DOUG
Top achievements
Rank 1
answered on 10 Jun 2011, 10:37 PM
Valeri,

I am using: .Net 4.0, Blend version 4.0.20525.0, Telerik WPF VSExtensions 2011.01.315.0, Visual Studio 2010 Professional 10.0.409219.1 SP1REL. The screen shows up fine in Visual Studio, but it causes the following error for the derived control when shown in the Blend designer: "Object reference not set to an instance of an object".

Thanks,

Doug
0
Valeri Hristov
Telerik team
answered on 14 Jun 2011, 12:11 PM
Hi Doug,

What's the version of the Telerik assemblies you are using? Can you prepare and send us a simple application (or update mine) that can be used to observe the problem?

Best wishes,
Valeri Hristov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
DOUG
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
DOUG
Top achievements
Rank 1
Share this question
or