コード例 #1
0
 private void InitializePicturePreviewControl()
 {
     PicturePreview                  = new PicturePreviewControl();
     PicturePreview.EffectType       = PicturePreviewEffectType.Wipe;
     PicturePreview.PanelScaleFactor = 0.5;
     PicturePreview.IsCompactMode    = true;
     PicturePreview.AllowAnimation   = true;
     this.elementHost1.Child         = PicturePreview;
 }
コード例 #2
0
 private void InitializePicturePreviewControl()
 {
     PicturePreviewHost               = new ElementHost();
     PicturePreviewHost.Dock          = DockStyle.Fill;
     PicturePreview                   = new PicturePreviewControl();
     PicturePreview.Close            += PicturePreview_Close;
     PicturePreview.ToggleFullScreen += PicturePreview_ToggleFullScreen;
     PicturePreview.ExitFullScreen   += PicturePreview_ExitFullScreen;
     PicturePreviewHost.Child         = PicturePreview;
     Controls.Add(PicturePreviewHost);
 }
コード例 #3
0
        public PictureViewContent(FrameworkElement sourceControl, Picture preview, Photo photo)
        {
            InitializeComponent();
            PropertiesBackKeyAction = new Action(() => OnCloseDetailsButtonClicked(this, new RoutedEventArgs()));
            SourceControl           = sourceControl;
            SourceControl.Opacity   = 0;

            Context = new ContentContext(photo);
            if (photo.Original is IPictureStreamReadinessInformation)
            {
                PictureReadiness        = (IPictureStreamReadinessInformation)photo.Original;
                PictureReadiness.Ready += OnPictureReady;
            }

            PicturePreviewControl.SetValue(PictureLoader.SourceProperty, preview);
            PictureControl.SetValue(PictureLoader.SourceProperty, photo.Original);
            Transition   = new ContinuumTransition();
            SizeChanged += OnSizeChanged;
        }
コード例 #4
0
 public CropToolManager(PicturePreviewControl preview)
 {
     Preview   = preview;
     MinWidth  = 10;
     MinHeight = 10;
 }