Click here to Skip to main content
15,891,253 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: silverlight file upload, error not displays on browser Pin
vpraveen12-Mar-13 23:08
vpraveen12-Mar-13 23:08 
GeneralRe: silverlight file upload, error not displays on browser Pin
Pete O'Hanlon12-Mar-13 23:12
mvePete O'Hanlon12-Mar-13 23:12 
QuestionWpf form design Pin
vikas5515011-Mar-13 20:39
vikas5515011-Mar-13 20:39 
AnswerRe: Wpf form design Pin
Abhinav S11-Mar-13 21:29
Abhinav S11-Mar-13 21:29 
Questionerror MC4104? Pin
SledgeHammer0110-Mar-13 15:08
SledgeHammer0110-Mar-13 15:08 
QuestionPrism and FluidKit Pin
DXXL10-Mar-13 2:46
DXXL10-Mar-13 2:46 
QuestionWhat is best technology choice (WCF/WPF, WebSockets, Rest) to share webcam video amongst up to 8 users? Pin
Paga Cession9-Mar-13 16:57
Paga Cession9-Mar-13 16:57 
QuestionAuto complete text box problem Pin
columbos149277-Mar-13 19:50
columbos149277-Mar-13 19:50 
Hello,
Im using the
System.Windows.Controls.AutoCompleteBox


Here is my XAML code:
XML
<Window x:Class="auotocomplitetrial.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:toolkit="clr-  namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <toolkit:AutoCompleteBox Name="autocompleteBox"  Height="50" Width="300"
                                 ItemsSource="{Binding MyList}"
                                 IsTextCompletionEnabled="True">
        </toolkit:AutoCompleteBox>
    </Grid>
</Window>


And here is my code behind the XAML:
C#
public partial class MainWindow : Window
 {
     private List<string> myList;

     public List<string> MyList
     {
         get { return myList; }
     }

     public MainWindow()
     {
         InitializeComponent();

         myList = new List<string>
                          {
                              "Macedonia",
                              "Madagascar",
                              "Malawi",
                              "Malaysia",
                              "Maldives",
                              "Mali",
                              "Malta",
                              "Marshall Islands",
                              "Mauritania",
                              "Mauritius",
                              "Mexico",
                              "Micronesia",
                              "Moldova",
                              "Monaco",
                              "Mongolia",
                              "Montenegro",
                              "Morocco",
                              "Mozambique",
                              "Myanmar"
                          };
         //autocompleteBox.ItemsSource = myList;
     }
 }


When i ran this code the auto complete text box doesn't auto completes.
But when i uncomment this line:
C#
//autocompleteBox.ItemsSource = myList;


And removed this one:
XML
ItemsSource="{Binding MyList}"


From the XAML, the auto complete text box works fine.

What i'm missing?

Thanks
AnswerRe: Auto complete text box problem Pin
Richard Deeming8-Mar-13 1:25
mveRichard Deeming8-Mar-13 1:25 
QuestionWPF / MVVM - Modular Design Question Pin
Kevin Marois7-Mar-13 7:27
professionalKevin Marois7-Mar-13 7:27 
AnswerRe: WPF / MVVM - Modular Design Question Pin
SledgeHammer017-Mar-13 9:51
SledgeHammer017-Mar-13 9:51 
GeneralRe: WPF / MVVM - Modular Design Question Pin
Kevin Marois7-Mar-13 14:10
professionalKevin Marois7-Mar-13 14:10 
GeneralRe: WPF / MVVM - Modular Design Question Pin
SledgeHammer017-Mar-13 15:07
SledgeHammer017-Mar-13 15:07 
GeneralRe: WPF / MVVM - Modular Design Question Pin
Kevin Marois8-Mar-13 5:28
professionalKevin Marois8-Mar-13 5:28 
AnswerRe: WPF / MVVM - Modular Design Question Pin
Wayne Gaylard8-Mar-13 6:10
professionalWayne Gaylard8-Mar-13 6:10 
GeneralRe: WPF / MVVM - Modular Design Question Pin
Kevin Marois8-Mar-13 6:14
professionalKevin Marois8-Mar-13 6:14 
GeneralRe: WPF / MVVM - Modular Design Question Pin
Wayne Gaylard8-Mar-13 6:35
professionalWayne Gaylard8-Mar-13 6:35 
GeneralRe: WPF / MVVM - Modular Design Question Pin
Kevin Marois11-Mar-13 8:39
professionalKevin Marois11-Mar-13 8:39 
GeneralRe: WPF / MVVM - Modular Design Question Pin
SledgeHammer0111-Mar-13 10:20
SledgeHammer0111-Mar-13 10:20 
GeneralRe: WPF / MVVM - Modular Design Question Pin
Wayne Gaylard12-Mar-13 1:38
professionalWayne Gaylard12-Mar-13 1:38 
AnswerRe: WPF / MVVM - Modular Design Question Pin
Abhinav S10-Mar-13 5:31
Abhinav S10-Mar-13 5:31 
GeneralRe: WPF / MVVM - Modular Design Question Pin
SledgeHammer0111-Mar-13 14:52
SledgeHammer0111-Mar-13 14:52 
AnswerRe: WPF / MVVM - Modular Design Question Pin
Abhinav S11-Mar-13 17:03
Abhinav S11-Mar-13 17:03 
GeneralRe: WPF / MVVM - Modular Design Question Pin
SledgeHammer0111-Mar-13 17:38
SledgeHammer0111-Mar-13 17:38 
QuestionHow to expand TreeViewItem programatically? Pin
SledgeHammer013-Mar-13 19:16
SledgeHammer013-Mar-13 19:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.