|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
xaml questioncontrol that looks like this: xaml code <TextBox x:Class="PP.Controls.SecureStringTextBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> </TextBox> code behind 2 namespace PP.Controls { public partial class SecureStringTextBox : System.Windows.Controls.TextBox { public SecureStringTextBox() { InitializeComponent(); } } } Now I built a test app that looks like this: <Window x:Class="TestControl.Window1" xmlns:g="clr-namespace:PP.Controls;assembly=PP.Controls" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="TestControl" Height="300" Width="300" > <Grid></Grid> </Window> Now the assembly name is PP.Controls.dll and I have a reference to that library in my test app. Even doing that I get a blue underline under xmlns:g="clr-namespace:PP.Controls;assembly=PP.Controls" and it says "Error 1 Assembly 'PP.Controls' was not found. The 'clr-namespace' URI refers to an assembly that is not referenced by the project. Now it runs fine but if I the design parts says "Visual Studio has encounted an error reading the designer file. The errors are shown in the task list. Make sure appropriate change to the designer file and then click on the design button to try again". Now if I double click on the design part I get an error in the Error list that says 'Assembly 'PP.Controls' was not found. The 'clr-namespace' URI refers to an assembly that is not referenced by the project." Can someone tell me what i'm doing wrong? Thanks |
|||||||||||||||||||||||