private List<TangramShape> shapes; //all the shapes #endregion Fields #region Constructors /// <summary> /// Create shapes and load them in the scatterview. /// </summary> /// <param name="level">the level selected by the user</param> public MainScatterView(int level) { InitializeComponent(); this.mng = new ShapesManager(); this.shapes = this.mng.getShapes(); //Shapes generation on the ScatterView for (int i = 0; i < this.shapes.Count; i++) { ScatterViewItem m = mng.minimizeShape(this.shapes[i].getMotherPiece()); this.scatter.Items.Add(m); m.Visibility = (Visibility)1; if (this.shapes[i].getLevel == level || level == 0) { m.Visibility = (Visibility)0; } } }