Click here to Skip to main content
15,894,106 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Asynchronous Design Issue Pin
SledgeHammer018-Apr-13 19:15
SledgeHammer018-Apr-13 19:15 
GeneralRe: Asynchronous Design Issue Pin
Mycroft Holmes8-Apr-13 19:27
professionalMycroft Holmes8-Apr-13 19:27 
AnswerRe: Asynchronous Design Issue Pin
Abhinav S8-Apr-13 23:23
Abhinav S8-Apr-13 23:23 
GeneralRe: Asynchronous Design Issue Pin
Mycroft Holmes9-Apr-13 2:44
professionalMycroft Holmes9-Apr-13 2:44 
QuestionHow to Set ItemSource of Autocomplete Textbox when placed inside Datagrid and that datagrid having multiple rows??? Pin
Shwetank1237-Apr-13 20:00
Shwetank1237-Apr-13 20:00 
AnswerRe: How to Set ItemSource of Autocomplete Textbox when placed inside Datagrid and that datagrid having multiple rows??? Pin
Naz_Firdouse7-Apr-13 21:18
Naz_Firdouse7-Apr-13 21:18 
GeneralRe: How to Set ItemSource of Autocomplete Textbox when placed inside Datagrid and that datagrid having multiple rows??? Pin
Shwetank1237-Apr-13 21:27
Shwetank1237-Apr-13 21:27 
GeneralRe: How to Set ItemSource of Autocomplete Textbox when placed inside Datagrid and that datagrid having multiple rows??? Pin
Naz_Firdouse7-Apr-13 21:58
Naz_Firdouse7-Apr-13 21:58 
It can be done in two ways...
if the data to be binded to AutoComplete textbox is large, bind that collection to Autocomplete box by setting the datacontext to parent element of datagrid or first control in the page(we usually use grid as the main content holder) where that datacontext holds the Autocomplete collection and bind it to AutoCompleteBox.
Here in this sample, they are binding some static resource. you can replace it with your collection and it gets binded.(Same collection gets binded to all AutoCompleteBox).
CSS
<input:AutoCompleteBox

                                    HorizontalAlignment="Left"

                                    Width="180"

                                    IsTabStop="True"

                                    Text="{Binding UserName, Mode=TwoWay}"

                                    ItemsSource="{StaticResource SampleHeroes}"

                                    />



another solution is if you want different collection to be binded, you can add one more property to Users class (in this sample) which holds the collection and you can bind it directly inside AutoCompleteBox....
e.g
new Users{ UserName="Hiro Nakamura", Age=24, Gender="M", Country="Japan", AutoCompleteList = new List<string>{"Hi","Hello","Welcome","Bye" } }

But it does not seems to be good...
you can use the first approach.
QuestionRe: How to Set ItemSource of Autocomplete Textbox when placed inside Datagrid and that datagrid having multiple rows??? Pin
Shwetank1237-Apr-13 22:23
Shwetank1237-Apr-13 22:23 
AnswerRe: How to Set ItemSource of Autocomplete Textbox when placed inside Datagrid and that datagrid having multiple rows??? Pin
Naz_Firdouse7-Apr-13 23:20
Naz_Firdouse7-Apr-13 23:20 
GeneralRe: How to Set ItemSource of Autocomplete Textbox when placed inside Datagrid and that datagrid having multiple rows??? Pin
Shwetank1237-Apr-13 23:25
Shwetank1237-Apr-13 23:25 
QuestionFile drag and drop in in-browser app Pin
CCB20106-Apr-13 3:26
CCB20106-Apr-13 3:26 
GeneralRe: File drag and drop in in-browser app Pin
CCB20108-Apr-13 10:35
CCB20108-Apr-13 10:35 
GeneralRe: File drag and drop in in-browser app Pin
SledgeHammer018-Apr-13 11:19
SledgeHammer018-Apr-13 11:19 
GeneralRe: File drag and drop in in-browser app Pin
CCB201010-Apr-13 2:55
CCB201010-Apr-13 2:55 
QuestionReturn key passed to a user control Pin
Mycroft Holmes2-Apr-13 14:44
professionalMycroft Holmes2-Apr-13 14:44 
AnswerRe: Return key passed to a user control - solved Pin
Mycroft Holmes2-Apr-13 14:57
professionalMycroft Holmes2-Apr-13 14:57 
GeneralRe: Return key passed to a user control - unsolved Pin
Mycroft Holmes2-Apr-13 15:16
professionalMycroft Holmes2-Apr-13 15:16 
GeneralRe: Return key passed to a user control - unsolved Pin
SledgeHammer013-Apr-13 7:58
SledgeHammer013-Apr-13 7:58 
GeneralRe: Return key passed to a user control - unsolved Pin
Mycroft Holmes3-Apr-13 12:37
professionalMycroft Holmes3-Apr-13 12:37 
GeneralRe: Return key passed to a user control - unsolved Pin
SledgeHammer013-Apr-13 12:43
SledgeHammer013-Apr-13 12:43 
QuestionWPF performance on Windows XP Pin
Vasudevan Deepak Kumar2-Apr-13 10:46
Vasudevan Deepak Kumar2-Apr-13 10:46 
AnswerRe: WPF performance on Windows XP Pin
SledgeHammer012-Apr-13 11:39
SledgeHammer012-Apr-13 11:39 
GeneralRe: WPF performance on Windows XP Pin
Gerry Schmitz2-Apr-13 12:05
mveGerry Schmitz2-Apr-13 12:05 
GeneralRe: WPF performance on Windows XP Pin
SledgeHammer012-Apr-13 12:12
SledgeHammer012-Apr-13 12:12 

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.