void SelectMatch_Loaded(object sender, RoutedEventArgs e) { try { if (isfirst) { //获取场次 _matchList = FaceFun.GetMatch(); foreach (var child in _matchList) { var item = new SelectItem(child); item.Click += item_Click; Spanel.Children.Add(item); } var firstOrDefault = Spanel.Children.OfType <SelectItem>().FirstOrDefault(); if (firstOrDefault != null) { firstOrDefault.Effect = new DropShadowEffect() { Color = Colors.White, BlurRadius = 20, Opacity = 1 }; ThisMath = firstOrDefault.Info; } isfirst = false; } } catch (Exception ex) { ex.ToSaveLog("SelectMatch_Loaded:"); } }