xaml.cs ------------------------------------------------
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
DataContext = new ComboBoxPatterns();
}
ComboBoxPatterns.cs ----------------------------------
public class ComboBoxPatterns
{
public List<string> Collection1 { get; set; }
public List<string> Collection2 { get; set; }
public ComboBoxPatterns()
{
Collection1 = new List<string>()
{
"Whatever",
"Whatever",
};
Collection2 = new List<string>() {
"Whatever2",
"Whatever2",
};
xaml --------------------------------------------
<ComboBox
ItemsSource="{Binding Collection1}"/>
<TextBox
Text="{Binding Collection2}" />
I often have to add new entries to Collection1 and Collection2.
So far, I've just added the new entries manually and recompile the application to make the new entries available.
My question is, is there a way to make changes and make them available without recompiling the application?