JohnDotOwl
JohnDotOwl

Reputation: 3755

unable to display data from list

for some reason it isnt displaying the dates anything wrong with it?

IsolatedStorageSettings uc = IsolatedStorageSettings.ApplicationSettings;

public void load()
        {
            List<DateTime> List = new List<DateTime>();
            Schedule.ItemsSource = null;
            List<s> medicationList = (List<s>)uc["nList"];

            foreach(sn temp in List)
            {
                if (dateList.Contains(t.Date))
                {

                }
                else
                {                    
                    date.Add(t.Date);
                    Schedule.ItemsSource = List;
                }
            }
        }

Stupid mistake (Solution)

<ListBox x:Name="Schedule" >
</ListBox>

The those and remove unnecessary codes

Upvotes: 0

Views: 264

Answers (1)

Eren Ers&#246;nmez
Eren Ers&#246;nmez

Reputation: 39095

As a start, move lstboxSchedule.ItemsSource = dateList; outside the foreach.

Set breakpoints to see if/why the list produced is empty.

Upvotes: 1

Related Questions