Search
Active

1
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Bug
ID: 508587
Opened: 11/5/2009 12:54:52 PM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
I create a basic TemplatedControl via Visual Studio. I then inherit TabControl instead of Control. It technically works (ie passes compile) but inside Expression Blend 3, I get an error " object reference not set to an instance of an object".

Then if i click on the TabItem itself, the error goes away? anyone experience this?

I tested this out on a brand new project with nothing it other than a custom tab control and same thing happens (so it could very well be an expression bug?)

Code is here:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Riagenic.UXLib.Controls.Chrome
{
    public class ChromeTabControl : TabControl
    {
        public ChromeTabControl() : base()
        {
            this.DefaultStyleKey = typeof(ChromeTabControl);

        }
    }
}
Details (expand)

Product?

Blend

Product Version?

Blend 3 (3.0.1927.0)

Issue Type?

Bug
Repro Steps? (N/A for Suggestion)
Create a Project.
Create a Silverlight TemplatedControl.
Change the inheritance from Control to TabControl.
Open up Expression Blend.
Find your CustomTabControl, drag it onto MainPage.xaml and watch the error unfold before you.
File Attachments
2 attachments
ChromeTabControl.cs
Generic.xaml
Sign in to post a comment.