Window AllowsTransparency="True" brings up error for Design view in VS2005

Just been coding with WPF, and I always get this error when trying to look at the Design view when I have AllowsTransparency="True" for the window. I get the Whoops! screen, and more specifically I get an error in the Error List.

Error: Property 'AllowsTransparency' was not found or is not serializable for type 'Window'

To allow viewing in Design View, I have to get rid of the AllowsTransparency attribute.

However, I can compile it and it runs fine with the AllowsTransparency property. And It also renders fine in Expression Blend's Design view.

I know this is beta software we're looking at... but is it fixable

BTW, Happy New Year from Brisbane, Queensland, Australia :-)

Chris



Answer this question

Window AllowsTransparency="True" brings up error for Design view in VS2005

  • Rajasekaran Ponnusamy

    Yes, it is in the solution explorer. click the xaml file and right click and 'open with'

  • Wil B

    I got the same annoying error. Is there yet a solution for it
  • Javfarary

    you could possibly disable the design view by right clicking on the xaml file and making the default editor as xml editor.
  • Douglas H. Troy

    Weird, I had to shut down VS2005 and bring it up again for it to come up.

    Do you usually code in the XML editor Have you found it to be adequate

    I remember the days of coding HTML / CSS / PHP with notepad (well, a PHP editor that colors code) and pretty much knowing exactly what it'll look like while tapping away at the keyboard. So hopefully this won't be too different.

    Is there anyway to preview the screen For example, if I have a ten forms and I want to look at what one of them would look like, is that possible That is, without starting up the app and clicking through to the form I want to check.

    Chris


  • Michaelliu

    I think it is good enough, you get good intellisense for the most part, we just can't get a preview

  • sunrunner

    Just wondering, is this in Solution Explorer Because that option doesn't come up for me.

    Chris


  • NetPochi

    It is useful to have a preview of the window you are designing. I have run into this problem a couple of times and I find the best way to get around the problem is to remove the xaml AllowsTransparency="True" attribute, then drop down into C# and in the constructor insert this.AllowsTransparency = True;

    public partial class Window1 : System.Windows.Window

    {

    public Window1()

    {

    this.AllowsTransparency = true;

    }

    }


    Hope this helps.


  • Nick Boyd

    Thanks for bringing this to my attention I have long forgotten how to do this in VS :)

    Cider just isn't useful right now. I use a wacky combination of xamlpad, blend and vs2005 to do my WPF programming right now.


  • Window AllowsTransparency="True" brings up error for Design view in VS2005