i have created a seprate class file and i want to add that namespace in XAML file (cutom namespace) is it necessory first i creat the .dll of class which i have created......?
i have created program in this way and it is showing me error can any one help me...............?
Hi
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:custom="clr-namespace:Customer"
d:DesignHeight="300" d:DesignWidth="400">
<src:Customers x:Key="Customers"/> //Error is here occured Error1'src' is an undeclared prefix. Line 11, position 14.
//Add Customer classnamespace SimpleDataBindingSecond
{
public class Customer
{
public String FirstName { get; set; }
public String LastName { get; set; }
public String Address { get; set; }
public Customer(String firstName, String lastName, String address)
{
this.FirstName = firstName;
this.LastName = lastName;
this.Address = address;
}
}
public class Customers : ObservableCollection
{
public Customers()
{
Add(new Customer("Michael", "Anderberg",
"12 North Third Street, Apartment 45"));
Add(new Customer("Chris", "Ashton",
"34 West Fifth Street, Apartment 67"));
Add(new Customer("Cassie", "Hicks",
"56 East Seventh Street, Apartment 89"));
Add(new Customer("Guido", "Pica",
"78 South Ninth Street, Apartment 10"));
}
}
}

Hemant KumarPosted Sep 28, 2011, 4:36 AM
This topic further explains the presence and purpose of the two XML / XAML namespace (xmlns) mappings as found in the root element of most Silverlight XAML files. It also describes how to produce similar mappings for using elements that are defined in your own code, and/or within separate assemblies such as those that are distributed as client libraries in the Silverlight SDK.
This topic contains the following sections.