0

I'm currently trying to use this TextBox AutoComplete custom control :

http://www.codeproject.com/Articles/26535/WPF-Autocomplete-Textbox-Control?msg=3484969#xx3484969xx

This is the first time I'm adding such external things in my project and when I add the header line in my Xaml file like explained in the article :

    <UserControl x:Class="Maha.Gestion.Note_de_frais.SaisieNoteDeFrais"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"

             xmlns:local="clr-namespace:WPFAutoCompleteTextbox"
         >

VisualStudio tell me that clr-namespace is not included in the assembly.

I'm sure this is something totally trivial but after few hours still can't find any solution.

All files asked by the author of the article has been added of course.

Someone can explain me the good way to add such external resources ?

Thanks

1
  • 1
    You might want to check the namespace present in the AutoCompleteEntry.cs file. Did you change it by any chance?
    – Prash
    Jul 31, 2013 at 9:12

1 Answer 1

1

xmlns stands for XML NameSpace. It basically links a prefix of your choice to a namespace. In your case, it links the local prefix with the namespace declared in the file that you want to use.

You can find out more by looking at the XAML Namespaces and Namespace Mapping for WPF XAML article at MSDN.

  1. Please check that the file that you want to use has this exact namespace declared.

  2. Please remove all white space from your xmlns declarations - you may have extraneous characters hidden there.

Like this:

xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:local="clr-namespace:WPFAutoCompleteTextbox">
1
  • I removed it to work on something else and for no reason when i put it back again to check your first advice no error occured. Sorry for bothering you guys and thanks for the time you took to help me ! Ps : the white space in my example was only here to put on evidence the good line, there's no white space in my code :) thx anyway
    – 3wic
    Jul 31, 2013 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.