コード例 #1
0
        private bool OpenAsXml()
        {
            var content = new StreamReader(_source.OpenRead()).ReadToEnd();

            ContentViewerService.ShowSourceCode(_fileName, SourceLanguageType.Xaml, content);
            return(true);
        }
コード例 #2
0
        private bool OpenAsImage()
        {
            var bitmap = new BitmapImage();

            bitmap.SetSource(_source.OpenRead());
            ContentViewerService.ShowImage(_fileName, bitmap);
            return(true);
        }