Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1002499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:50:25+00:00 2026-05-16T07:50:25+00:00

i am doing this xaml : <StackPanel Margin=320,0,0,0 Grid.RowSpan=2> <ListView ItemsSource={Binding employeeCollection}> <ListView.View> <GridView>

  • 0

i am doing this xaml :

 <StackPanel Margin="320,0,0,0" Grid.RowSpan="2">
        <ListView ItemsSource="{Binding employeeCollection}">
            <ListView.View>
                <GridView>

                    <GridViewColumn Header="Employee ID" DisplayMemberBinding="{Binding Path=EmployeeID}"/>
                    <GridViewColumn Header="First Name" DisplayMemberBinding="{Binding Path=FirstName}"/>
                    <GridViewColumn Header="Last Name" DisplayMemberBinding="{Binding Path=LastName}"/>
                    <GridViewColumn Header="start" DisplayMemberBinding="{Binding Path=startHR}"/>
                    <GridViewColumn Header="finish" DisplayMemberBinding="{Binding Path=finishHR}">

                </GridViewColumn>
            </GridView>
    </ListView.View>

        </ListView>
    </StackPanel>

and the code behind is :

class employeesGrid //: INotifyPropertyChanged
{
    ObservableCollection<employiesData> _employeeCollection = 
    new ObservableCollection<employiesData>();

    public employeesGrid()
{
    _employeeCollection.Add(new employiesData{

      EmployeeID = "World Of Warcraft", 
      FirstName = "Blizzard", 
      LastName = "Blizzard",
      startHR = "2222",
      finishHR = "dfs"
  });


}

    public ObservableCollection<employiesData> employeeCollection
{ get { return _employeeCollection; } }


}

public class employiesData
{
    public string EmployeeID { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public string startHR { get; set; }
    public string finishHR { get; set; }
}

}

where inside my main window i am doing :

//constructor:
InitializeComponent();
employeesGrid em = new employeesGrid();

1.can someone please guide me what am i doing wrong ?
2.INotifyPropertyChanged why should i use it ? how should i use it ?

thanku for gazing in my work it means a lot to me 🙂

lets say i want two sturctures like this in my program what would be the best implmantion ????

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:50:25+00:00Added an answer on May 16, 2026 at 7:50 am

    You never set your listviews’ DataContext.

    Try this in your window constructor:

    InitializeComponent(); 
    employeesGrid em = new employeesGrid();
    this.DataContext = em;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my current XAML. <StackPanel Orientation=Horizontal Grid.Column=3 Grid.Row=1> <Label Content=Allocated: FontSize=14/> <Label Content={Binding
This is my current XAML. <StackPanel Orientation=Horizontal Grid.Column=3 Grid.Row=1> <Label Content=Allocated: FontSize=14/> <Label Content={Binding
I write these code in mainpage.xaml <Grid x:Name=ContentPanel Grid.Row=1 Margin=12,0,12,0> <StackPanel> <TextBox x:Name=xxx Text={Binding
So I have this XAML in the .xaml file <StackPanel> <Button Width=200 Height=30 Content=Change
I have a ComboBox whose XAML looks as follows: <StackPanel Grid.Row = 0 Style={DynamicResource
I navigate to my pivote page by doing this this.NavigationService.Navigate(new Uri(/PivotScreen.xaml, UriKind.Relative)); Is there
I have a WPF Grid with a XAML similar to this: <Grid width=200 Height=200
Im doing this project where i need to download files through a webservice (images,
I am interested in doing this C code in Java: // sets n's ith
I am doing this currently, class Page { // variable to hold DBC class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.