コード例 #1
0
        private void StartMagnify(object sender, EventArgs e)
        {
            if (this.magnifier != null)
            {
                this.magnifier.CloseService();
                this.magnifier = null;
            }

            this.magnifier = new Magnifier(this);
            this.ContentRoot.Children.Add(this.magnifier.Visual);

            this.magnifier.ServiceClosed += delegate {
                this.Magnify.IsChecked = false;
                if (this.magnifier != null)
                {
                    this.ContentRoot.Children.Remove(this.magnifier.Visual);
                }
                this.magnifier = null;
            };
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: peteblois/rooler
        private void StartMagnify(object sender, EventArgs e)
        {
            if (this.magnifier != null) {
                this.magnifier.CloseService();
                this.magnifier = null;
            }

            this.magnifier = new Magnifier(this);
            this.ContentRoot.Children.Add(this.magnifier.Visual);

            this.magnifier.ServiceClosed += delegate {
                this.Magnify.IsChecked = false;
                if (this.magnifier != null)
                    this.ContentRoot.Children.Remove(this.magnifier.Visual);
                this.magnifier = null;
            };
        }