public override void OnPropertyChange(RadElement element, RadPropertyChangedEventArgs e) { if (!(bool)e.NewValue || this.popupShown) { return; } this.popupShown = true; ZoomPopup zoomPopup = new ZoomPopup(element, new SizeF(2f, 2f)); zoomPopup.AnimationFrames = 10; zoomPopup.AnimationInterval = 20; zoomPopup.BeginInit(); zoomPopup.Closed += (EventHandler)((sender, ea) => { this.popupShown = false; ThemeResolutionService.UnsubscribeFromThemeChanged((IThemeChangeListener)((RadControl)sender).ElementTree); }); zoomPopup.EndInit(); zoomPopup.Show(); }
public override void OnPropertyChange(RadElement element, RadPropertyChangedEventArgs e) { if ((bool)e.NewValue == true) { if (!popupShown) { popupShown = true; ZoomPopup popup = new ZoomPopup(element, new SizeF(2f, 2f)); popup.AnimationFrames = 10; popup.AnimationInterval = 20; popup.UseNewLayoutSystem = true; popup.BeginInit(); popup.Closed += delegate(object sender, EventArgs ea) { popupShown = false; ThemeResolutionService.UnsubscribeFromThemeChanged(((ZoomPopup)sender).ElementTree); }; popup.EndInit(); popup.Show(); } } }