.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Why Can't I Design XAML Sometimes?

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :JQuery

I have inherited source code from a project.

I am trying to decypher how it all fits together. It uses XAML. The problem is that when I open the XAML files, Visual Studio 2008 does not display it in Design Mode, and when it shows the file in text form, many of the elements seem to be undefined -- I mean, it is displayed with that red squigglie line unter the title of some of the XML tages -- like "UserDefined" and "Grid".

I thought that if I install Expression Blend, it will have these elements defined. But this did not work. Any ideas?

My first idea was that this was a Visual Studio 2008 issue and that it would work in the current Visual Studio 2010. But their are tabs that appear when I first open the XAML file for displaying the file graphically or as text. It defaults as text. But when I click to show it graphically, it shows an error window.

I am viewing this in Visual Studio 2008 and I am loading a solutions file when I view this.

But here is where it gets wierd. If I open the XAML file sepeately on another computer in Visual Studio 2010, it displays properly in Design mode. So what do I have on one computer that I am missing on the other one?

Web Master and Programmer

View Complete Post

More Related Resource Links

VS 2010 XAML Design View Load always fail with a Type Load Exception

Create a new WPF project in VS and change nothing. The Design View will fail to load with the error below. Error    1    Could not load type 'Microsoft.Expression.DesignModel.Core.ISharedInstanceBuilder' from assembly 'Microsoft.Expression.DesignModel, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Microsoft.Expression.DesignModel is an assembly from Expression Blend. I ever installed Blend 4 RC and uninstall and install Blend 4. I Reflector the assembly I have under Blend 4 bin folder. And cannot find a interface named ISharedInstanceBuilder. But the WPF project is a Template project without any changes. How it get related with Blend 4? And how to fix it? Thanks.  

Cannot use an existing contract to design a xaml workflow


I am trying to use a contract first approach in designing Workflows but am facing problems. 

For Eg. If I have a Service Contract

[ServiceContract (Namespace="http://abc.com")]


    public interface IRegistry



        [FaultContract(typeof (CustomFault))]

        List<string> Update1(string projectToAdd);



        List<string> Update2(string projectToAdd);


I set the ServiceContract name as {http://abc.com/}IRegistry for the receive activity. But I was not able to make it hookup to the interface where I have a service attribute attached. 

How can I make sure that I implement the same interface when building a workflow in the designer. I was able to implement the same in a coded workflow though. Or even if I use a WorkFlowServiceHost I am able to attach service behaviors but am unable to do so without a WorkFlowServiceHost.

Bottom line is that is there any way we can use a Contract first approach for a XAML workflow and not a cod

Abstract Factory Design in C# , Vb.NET

Provide an interface for creating families of related or dependent objects without specifying their concrete classes

Prototype Design Pattern in C#. Vb.NET

Specify the kind of objects to create using a prototypical instance, and create new objects by copying this prototype

Adapter Design Pattern in C#, VB.NET

Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.

Singleton Design Pattern in C#, Vb.NET

Ensure a class has only one instance and provide a global point of access to it.

Solidify Your C# Application Architecture with Design Patterns

design pattern can solve many problems by providing a framework for building an application. Design patterns, which make the design process cleaner and more efficient, are especially well-suited for use in C# development because it is an object-oriented language. Existing design patterns make good templates for your objects, allowing you to build software faster. This article describes several popular design patterns you can use in your own applications, including the singleton, the decorator, the composite, and the state classes, which can improve the extensibility of your applications and the reuse of your objects.

What Are Design Patterns and Do I Need Them?

Software professionals may be familiar with the term "Design Patterns," but many have no idea of where they come from and what they truly are. Consequently, some do not see the value and benefits design patterns bring to the software development process, especially in the areas of maintenance and code reuse.

Design Patterns for .NET

It is not the intent of the Design Pattern Series to focus on providing a theoretical knowledge dump of all there is to know about design patterns. There are many books that do that already. Instead, this series will focus on providing lots of practical examples. However, there will be some theory to help address important points concerning design patterns. I use the theory of design patterns mostly as a guide and instead make references to good design pattern books for more detail explanation.

Singleton Design Pattern in Asp.net using C#

When we want to make a only one instance of a class and also making sure that there is a global access point to that object then the design pattern we user is called Singleton. The pattern ensures that the class is instantiated only once and that all requests are directed to that one and only object.

The Factory Design Pattern

Software architects generally think in terms of high-level abstractions rather than low-level programming details. Representing a system in terms of high-level abstractions promotes understanding of the system and reduces its perceived complexity. One such set of abstractions is software design patterns. They have been successfully applied in the past to simplify and solve recurring problems in software design.

Abstract Factory Design Pattern (Sample in C# and VB .NET)

An abstract factory provides an interface for creating families of related objects without specifying their concrete classes. Sometimes one wants to construct an instance of one of a suite of classes, deciding between the classes at the time of instantiation. In order to avoid duplicating the decision making everywhere an instance is created, we need a mechanism for creating instances of related classes without necessarily knowing which will be instantiated.

GOF Creational Design Patterns with C#

The GOF design patterns help address the following challenges :

design ready to accommodate change & growth

design flexible systems which come ready to handle reconfiguration and run time tailoring

code in manner to facilitate reuse during the development and extension phases ... ie. both external and internal reuse, so that we are rewarded by efficiencies as the project progresses, coming from investments made earlier in the project.

implement change in a way that doesn't overly shorten the system's useful lifespan

Design Patterns - Using the State Pattern in C#

What is the State Pattern?

The State Pattern is a behavioral pattern that can be used to alter the behavior of an object at run time. As the state of an object changes, the functionality of the object can change drastically. This change of behavior is hidden from the Client and the Client interfaces with a wrapper object known as the Context. The State Pattern is a dynamic version of the Strategy Pattern.

What's new in XAML of .NET 4.0

With .NET 4.0 Microsoft will bring up a improved version of XAML. This arcitle shows you the language enhancements they made.
Easy Object References with {x:Reference}

Built-in Types

Generics in XAML with x:TypeArguments

Support for Arbitrary Dictionary Keys

Use of Non-Default Constructors with x:Arguments

Use of Static Factory Methods with x:FactoryMethod

Design Patterns

gives Total Idea About Design Patterns

Need help for Architecture design


I need help to make decision for making framework for new project.
Project is financing (banking) project. It'll b using .net 3.5 sp1 with sql server 2005.
I want to know what should be best approach for framework? Mean to use LINQ or go with Stored procedure way with 3 tier architecture?
or anything else?

For current financing project the framework is done by one of MVP. He used LINQ to all things.
But we facing problem of w3wp process hang. We cant go for web gardening or farming bcz LINQ objects cnt be serialized to store in Session etc.
Difficult to use Transactions in LINQ. Have to use TransactionScope lead to MSDTC problems etc.

Please give your opinion.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend