private void AddNewLayer(object sender, RoutedEventArgs e) { //Enables the popup for the user to enter a custom name for the sprite/layers PopupWindow popup = new PopupWindow(); popup.ShowDialog(); string Name = popup.Name; //Then creates a new sprite with that name passed in and adds it to the view model Sprite sprite = new Sprite { Image = BitmapFactory.New((int)backBuffer.Width, (int)backBuffer.Height), Name = Name }; viewModel.SpriteList.Add(sprite); UpdateBitmap(); }
private void btnWindow2_Click(object sender, RoutedEventArgs e) { PopupWindow pop = new PopupWindow(); pop.ShowDialog(); }