protected void InstantiateWheel() { if (wheel != null) { this.grid.Children.Remove(wheel); } if (wheelClass != null) { wheel = (ColourWheels.ColourWheel)Activator.CreateInstance(WheelClass); wheel.Name = "wheel"; wheel.Margin = new Thickness(10.0); wheel.MouseDown += wheel_MouseDown; wheel.CacheMode = new BitmapCache(); Canvas.SetZIndex(wheel, -1); this.grid.Children.Add(wheel); } }
protected void InstantiateWheel() { if (wheel != null) this.grid.Children.Remove(wheel); if (wheelClass != null) { wheel = (ColourWheels.ColourWheel)Activator.CreateInstance(WheelClass); wheel.Name = "wheel"; wheel.Margin = new Thickness(10.0); wheel.MouseDown += wheel_MouseDown; wheel.CacheMode = new BitmapCache(); Canvas.SetZIndex(wheel, -1); this.grid.Children.Add(wheel); } }