Beispiel #1
0
        private void PubblicoWindow_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            if (this.DataContext != null)
            {
                // Creo la classe che gestisce le aree di rispetto per ritaglio
                galleryUICommon = new GalleryUIRispetto(galleryItemsControl, this);

                // Purtroppo qui devo sempre ascoltare perché non ho indicazione sulla checkbox indicata dall'utente nella gallery
                galleryUICommon.ascolta(true);
            }
        }
Beispiel #2
0
        protected override void OnClosing(CancelEventArgs e)
        {
            if (galleryUICommon != null)
            {
                galleryUICommon.Dispose();
                galleryUICommon = null;

                this.DataContext = null;
            }

            base.OnClosing(e);
        }