示例#1
0
        private void GenerateNPC_Click(object sender, RoutedEventArgs e)
        {
            CharacterGeneratorViewModel vm = new CharacterGeneratorViewModel()
            {
                Parent = ViewModel
            };
            NPCGeneratorView npcGen = new NPCGeneratorView()
            {
                DataContext = vm
            };

            npcGen.ShowDialog();
        }
 public CharacterGeneratorView()
 {
     InitializeComponent();
     DataContext = new CharacterGeneratorViewModel();
 }