Click here to Skip to main content
15,867,141 members
Home / Discussions / WPF
   

WPF

 
QuestionJesús Alvarez Manrique Pin
Member 901299827-Sep-12 6:47
Member 901299827-Sep-12 6:47 
AnswerRe: Jesús Alvarez Manrique Pin
Yayozama27-Sep-12 7:37
Yayozama27-Sep-12 7:37 
GeneralRe: Jesús Alvarez Manrique Pin
Member 901299827-Sep-12 7:57
Member 901299827-Sep-12 7:57 
GeneralRe: Jesús Alvarez Manrique Pin
Emmanuel Medina27-Sep-12 11:33
professionalEmmanuel Medina27-Sep-12 11:33 
GeneralRe: Jesús Alvarez Manrique Pin
Member 901299827-Sep-12 7:59
Member 901299827-Sep-12 7:59 
QuestionBobbles in paradise - ViewModel and my personal adventures in WTF Pin
Kenneth Haugland26-Sep-12 18:25
mvaKenneth Haugland26-Sep-12 18:25 
Questionbeginner : binding ListBox Pin
dominioYP26-Sep-12 4:05
dominioYP26-Sep-12 4:05 
AnswerRe: beginner : binding ListBox Pin
Pete O'Hanlon26-Sep-12 4:26
subeditorPete O'Hanlon26-Sep-12 4:26 
In your ListBox, you need to set the ItemsSource to your ListBoxCollection. To do this, you would add ItemsSource="{Binding ListBoxCollection}" in the ListBox. You also need to set the DataSource - as you are just learning, I would suggest keeping it simple and put DataContext = this; immediately after the call to InitializeComponent();.

Finally, you need to actually display something in your ListBox - if you run the application as it stands, you won't see the underlying data because WPF has no way to tell that it should be displaying Profilo. What you want to do is add an ItemTemplate to your ListBox (I'll leave that to you to look up). So, your XAML will look like this:
XML
<ListBox ItemsSource="{Binding ListBoxCollection}" ... put in your other settings here>
  <ListBox.ItemTemplate>
    <DataTemplate>
      <StackPanel>
        <TextBlock Text="{Binding Profilo}" />
      </StackPanel>
    </DataTemplate>
  </ListBox.ItemTemplate>
</ListBox>

*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

"Mind bleach! Send me mind bleach!" - Nagy Vilmos


CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: beginner : binding ListBox Pin
dominioYP26-Sep-12 5:41
dominioYP26-Sep-12 5:41 
GeneralRe: beginner : binding ListBox Pin
dominioYP28-Sep-12 5:38
dominioYP28-Sep-12 5:38 
Questionbeginner : listView, add scrollBar Pin
dominioYP26-Sep-12 3:50
dominioYP26-Sep-12 3:50 
QuestionTrying to set focus on DataGrid with DataGridTemplateColumn Pin
abollmeyer23-Sep-12 3:44
abollmeyer23-Sep-12 3:44 
AnswerRe: Trying to set focus on DataGrid with DataGridTemplateColumn Pin
abollmeyer24-Sep-12 14:13
abollmeyer24-Sep-12 14:13 
QuestionOn ContextMenu MouseLeave Pin
Kenneth Haugland21-Sep-12 3:46
mvaKenneth Haugland21-Sep-12 3:46 
AnswerRe: On ContextMenu MouseLeave Pin
Kenneth Haugland21-Sep-12 13:42
mvaKenneth Haugland21-Sep-12 13:42 
QuestionWPF DataGrid Not SHowing Any Data Pin
Kevin Marois20-Sep-12 11:30
professionalKevin Marois20-Sep-12 11:30 
AnswerRe: WPF DataGrid Not SHowing Any Data Pin
Kenneth Haugland20-Sep-12 11:47
mvaKenneth Haugland20-Sep-12 11:47 
GeneralRe: WPF DataGrid Not SHowing Any Data Pin
Pete O'Hanlon20-Sep-12 11:59
subeditorPete O'Hanlon20-Sep-12 11:59 
GeneralRe: WPF DataGrid Not SHowing Any Data Pin
Kenneth Haugland20-Sep-12 12:10
mvaKenneth Haugland20-Sep-12 12:10 
AnswerRe: WPF DataGrid Not SHowing Any Data Pin
Pete O'Hanlon20-Sep-12 12:01
subeditorPete O'Hanlon20-Sep-12 12:01 
GeneralRe: WPF DataGrid Not SHowing Any Data Pin
Kevin Marois20-Sep-12 13:23
professionalKevin Marois20-Sep-12 13:23 
GeneralRe: WPF DataGrid Not SHowing Any Data Pin
Pete O'Hanlon20-Sep-12 13:58
subeditorPete O'Hanlon20-Sep-12 13:58 
Questionstackedbarseries chart: change the axes display Pin
ashlyacht19-Sep-12 10:03
ashlyacht19-Sep-12 10:03 
Question[XML] XML binding Pin
Jayme6519-Sep-12 7:10
Jayme6519-Sep-12 7:10 
Questionplay streaming videos from internet in wpf Pin
sudeep kushwaha17-Sep-12 18:31
sudeep kushwaha17-Sep-12 18:31 

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.