Click here to Skip to main content
15,913,854 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Rendering a map Pin
Insincere Dave22-May-08 4:48
Insincere Dave22-May-08 4:48 
AnswerRe: Rendering a map Pin
Pete O'Hanlon22-May-08 5:02
mvePete O'Hanlon22-May-08 5:02 
QuestionIn a Canvas, for a given point how to get the proper UI element? Pin
Member 367304822-May-08 1:08
Member 367304822-May-08 1:08 
AnswerRe: In a Canvas, for a given point how to get the proper UI element? Pin
Insincere Dave22-May-08 4:15
Insincere Dave22-May-08 4:15 
GeneralRe: In a Canvas, for a given point how to get the proper UI element? Pin
Member 367304822-May-08 5:17
Member 367304822-May-08 5:17 
QuestionCanceling tab selection Pin
yanairon21-May-08 21:13
yanairon21-May-08 21:13 
QuestionBind CLR Object Instance To A ListBox Pin
BlitzPackage21-May-08 10:18
BlitzPackage21-May-08 10:18 
AnswerRe: Bind CLR Object Instance To A ListBox Pin
Insincere Dave21-May-08 13:18
Insincere Dave21-May-08 13:18 
The XAML is compiled before the code-behind, so you cannot use the instance you have declared in the way you are trying. You have a few options:

  • Give your ListBox a name and in the forms loaded event (not constructor) listbox1.ItemSource = partTimeEmployees
  • Use blend and add a datasource of type Employees, this will create a ObjectDataProvider and intialize its own Employees. Unless you fill the collection in the Employee constructor it'd likely be empty, that leads to the third option...
  • Create a 'DataSource' object that has properties for PartTimeEmployees, Customers, e.t.c. Make this a singleton that returns an instance with all the data populated. Then use this like the previous option you'll probably have to edit the XAML as seen in the links below, you can then drag the PartTimeEmployees property onto the ListBox and a binding dialog will popup. This method works at design-time which is helpful but it can slow down blend so you might want to check if it is design-time and only return a few employees. See here and here for more info about ObjectDataProvider.

GeneralRe: Bind CLR Object Instance To A ListBox Pin
BlitzPackage21-May-08 14:33
BlitzPackage21-May-08 14:33 
GeneralRe: Bind CLR Object Instance To A ListBox [modified] Pin
BlitzPackage21-May-08 14:36
BlitzPackage21-May-08 14:36 
GeneralRe: Bind CLR Object Instance To A ListBox Pin
Insincere Dave21-May-08 15:53
Insincere Dave21-May-08 15:53 
GeneralRe: Bind CLR Object Instance To A ListBox Pin
BlitzPackage22-May-08 6:36
BlitzPackage22-May-08 6:36 
GeneralRe: Bind CLR Object Instance To A ListBox Pin
Insincere Dave22-May-08 9:39
Insincere Dave22-May-08 9:39 
GeneralRe: Bind CLR Object Instance To A ListBox Pin
BlitzPackage22-May-08 14:52
BlitzPackage22-May-08 14:52 
GeneralRe: Bind CLR Object Instance To A ListBox Pin
BlitzPackage24-May-08 11:00
BlitzPackage24-May-08 11:00 
QuestionResource Dictionaries. Pin
Jammer21-May-08 6:04
Jammer21-May-08 6:04 
AnswerRe: Resource Dictionaries. Pin
User 27100925-May-08 8:14
User 27100925-May-08 8:14 
GeneralRe: Resource Dictionaries. Pin
Jammer26-May-08 10:16
Jammer26-May-08 10:16 
GeneralRe: Resource Dictionaries. Pin
User 27100926-May-08 10:35
User 27100926-May-08 10:35 
GeneralRe: Resource Dictionaries. Pin
Jammer26-May-08 11:12
Jammer26-May-08 11:12 
GeneralRe: Resource Dictionaries. [modified] Pin
Jammer26-May-08 23:36
Jammer26-May-08 23:36 
GeneralRe: Resource Dictionaries. Pin
Jammer27-May-08 6:38
Jammer27-May-08 6:38 
GeneralRe: Resource Dictionaries. Pin
User 27100927-May-08 8:47
User 27100927-May-08 8:47 
GeneralRe: Resource Dictionaries. Pin
Jammer27-May-08 8:58
Jammer27-May-08 8:58 
QuestionGet the top most child windows Pin
Rohde21-May-08 5:34
Rohde21-May-08 5:34 

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.