Example #1
0
        private void PageChanged(int pageIndex)
        {
            this.pageIndex = pageIndex;
            switch (pageIndex)
            {
            case 0:
                colorModelsView       = new ColorModelsView(CloseFrame);
                colorModelsViewModel  = new ColorModelsViewModel();
                MainFrame.DataContext = colorModelsViewModel;
                MainFrame.Content     = colorModelsView;
                break;

            case 1:
                fractalsView          = new FractalsView(CloseFrame);
                fractalsViewModel     = new FractalsDataViewModel(400, 400);
                MainFrame.DataContext = fractalsViewModel;
                fractalsView.FractalPower3Radio.Checked += FractalPowerChanged;
                fractalsView.FractalPower4Radio.Checked += FractalPowerChanged;
                MainFrame.Content = fractalsView;
                break;

            case 2:
                transformationsView      = new TransformationView(CloseFrame);
                transformationsViewModel = new TransformationsViewModel(transformationsView.HandleAnimationEnd);
                MainFrame.DataContext    = transformationsViewModel;
                transformationsView.CenterTransformRadio.Checked += TransformRadioChanged;
                transformationsView.VertexTransformRadio.Checked += TransformRadioChanged;
                MainFrame.Content = transformationsView;
                break;
            }
        }
 private void OpenFractalPreviewExecute(Fractal fractal)
 {
     if (fractal != null)
     {
         FractalsView.MoveCurrentTo(fractal);
         PreviewDialogService.Show(FractalsView);
     }
 }