using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Controls;
using Prism.Commands;
namespace FlexGridDemo;
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window {
private CheckBox _checkBoxAll;
private DelegateCommand<RoutedEventArgs> _onCheckedAllLoaded;
public MainWindow() {
InitializeComponent();
var elementItems = new ObservableCollection<ElementItem> {
new("A0", 1),
new("A1", 1),
new("A2", 1),
new("A3", 1),
new("A4", 1),
new("A5", 1)
};
ElementItems = elementItems;
FlexGridL1.ItemsSource = ElementItems;
}
public ObservableCollection<ElementItem> ElementItems { get; set; }
public class ElementItem {
public ElementItem(string elementName, double elementValue) {
ElementName = elementName;
ElementValue = elementValue;
}
public string ElementName { get; set; }
public double ElementValue { get; set; }
}
} |