public static void SetExpandedGroupKey(DependencyObject obj, WorldWar2Event value)
 {
     obj.SetValue(ExpandedGroupKeyProperty, value);
 }
コード例 #2
0
        private void CreateWorldWar2Events(List<WorldWar2Event> data, List<string> countries, string startDate, string endDate, List<string> axisList, List<string> alliesList, string details)
        {
            foreach (var country in countries)
            {
                WorldWar2Event dataItem = new WorldWar2Event();
                dataItem.StartDate = DateTime.Parse(startDate, CultureInfo.InvariantCulture);
                dataItem.EndDate = endDate == String.Empty ? dataItem.StartDate : DateTime.Parse(endDate, CultureInfo.InvariantCulture);
                dataItem.Country = country;
                dataItem.Axis = axisList;
                dataItem.Allies = alliesList;
                dataItem.Details = details;

                data.Add(dataItem);
            }
        }