예제 #1
0
        public PageSelect()
        {
            InitializeComponent();

            this.Zoom           = 1.0;
            viewBox.DataContext = this;

            CommandBinding cb = new CommandBinding(ApplicationCommands.Open);

            cb.Executed += new ExecutedRoutedEventHandler(cb_Executed);
            this.CommandBindings.Add(cb);

            CommandBinding cb1 = new CommandBinding(NavigationCommands.Zoom);

            cb1.Executed += new ExecutedRoutedEventHandler(cb1_Executed);
            this.CommandBindings.Add(cb1);

            ImageF image = ImageF.RandomPixelImage(10, 10, 1);

            Psf     = PSF.SymmetricGaussian(0.5);
            Picture = new ImageFWrapper(image);

            theImage.Source = Picture.Bitmap;
            viewBox.Width   = theImage.Width;
            viewBox.Height  = theImage.Height;
        }