示例#1
0
        private void Print()
        {
            var root   = FindRoot(Visual);
            var dialog = new ScreenshotDialog {
                DataContext = root
            };

            dialog.ShowDialog();
        }
示例#2
0
        private void CaptureScreenShot(object sender, ExecutedRoutedEventArgs e)
        {
            //Window is always visual so no need to check it
            //System.Windows.Media.Visual visual = this as System.Windows.Media.Visual;

            ScreenshotDialog dialog = new ScreenshotDialog();

            dialog.DataContext = this;
            dialog.ShowDialog();
            e.Handled = true;
        }