title: Auto generate WPF buttons based on a property in a collection using binding
body: <p>I want to bind a property in a collection to auto generate buttons, can this be achieved using data binding?</p>
  
  <p>What I tried to do without binding is the following:</p>
  
  <pre><code>        var servicesList = sad.GetAllServices().ToList();
  
          foreach (var service in servicesList)
          {
              var btn = new Button
              {
                  Name = "btnService_" + service.Id,
                  Content = service.NameEn,
                  Width = 200,
                  Height = 50,
                  Margin = new Thickness(20)
              };
  
              btn.Click += (sender, e) =&gt;
              {
                  // Handling click event...
              };
  
              PnlServices.Children.Add(btn);
          }
  </code></pre>
  
  <p>I want to create a button for each item in the collection and make the content of the button equal to item.NameEn</p>