Пример #1
0
        public (FrameworkElement, Size, string) GetViewer(FileInfo fileInfo)
        {
            var requestSize = new Size(572, 290);

            var fileViewer = new GeneficFileViewer();

            fileViewer.BeginInit();
            fileViewer.Thumbnail = ImagingHelper.GetThumbnail(fileInfo.FullName);
            fileViewer.FileInfo  = fileInfo;

            fileViewer.EndInit();

            return(fileViewer, requestSize, null);
        }
        public override FrameworkElement GetElement(string fileName)
        {
            var fileViewer = new GeneficFileViewer();

            fileViewer.BeginInit();
            fileViewer.Width = 500;
            fileViewer.Height = 280;
            fileViewer.Thumbnail = GetThumbnail(fileName);

            if (File.Exists(fileName))
            {
                fileViewer.FileInfo = new FileInfo(fileName);
            }
            else
            {
                fileViewer.FileInfo = new DirectoryInfo(fileName);
            }

            fileViewer.EndInit();

            return fileViewer;
        }
Пример #3
0
        public override FrameworkElement GetElement(string fileName)
        {
            var fileViewer = new GeneficFileViewer();

            fileViewer.BeginInit();
            fileViewer.Width     = 500;
            fileViewer.Height    = 280;
            fileViewer.Thumbnail = GetThumbnail(fileName);

            if (File.Exists(fileName))
            {
                fileViewer.FileInfo = new FileInfo(fileName);
            }
            else
            {
                fileViewer.FileInfo = new DirectoryInfo(fileName);
            }

            fileViewer.EndInit();

            return(fileViewer);
        }