Click or drag to resize

ShellFilePreview Class

A control for displaying file previews.
Inheritance Hierarchy

Namespace:  Jam.Shell.WPF.Controls
Assembly:  ShellBrowserWPF (in ShellBrowserWPF.dll) Version: 1.3.1
Syntax
public class ShellFilePreview : Control, 
	ICommonPreviewHandlerHost, IDisposable, IShellControlConnectorTarget

The ShellFilePreview type exposes the following members.

Constructors
  NameDescription
Public methodShellFilePreview
Default constructor.
Top
Properties
  NameDescription
Public propertyAutomaticRefresh
Gets or sets a value indicating whether the ShellFilePreview will be reloaded automatically when the file changes or is deleted. This is a dependency property.
Public propertyLocation
The location of the folder to be displayed.
Public propertyNoPreviewAvailableMessage
Gets or sets a message to be displayed if the item to be previewed is not supported.
Public propertyPath
Gets or sets the full pathname of the file/shell item to be displayed.
Public propertyPreviewNotPossibleMessage
Gets or sets a message to be displayed if loading the preview failed.
Public propertySelectFileMessage
Gets or sets a message to be displayed when no item is active.
Public propertyShellControlConnector
Gets or sets a ShellControlConnector.
Public propertyStateMessage
Gets or sets the message that is printed in the component if no preview is currently visible or an error occured.
Public propertyVersion
The current version of ShellBrowser Components WPF.
Top
Methods
  NameDescription
Public methodClear
Clears the contents of the preview.
Public methodDispose
Unloads any pending files and finishes running threads.
Protected methodDispose(Boolean)
Unloads any pending files and finishes running threads.
Public methodFolderChanged
Preview is cleared if a new folder has been set.
Public methodGetDisplayRect
Gets display rectangle.
Public methodGetSynchronizationContext
PreviewHost must provide its SynchronizationContext to be used by async events.
Public methodGetWindowHandle
Gets window handle of the main window.
Protected methodOnAfterPreviewLoaded
Calls the AfterPreviewLoaded event.
Public methodOnApplyTemplate
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.
(Overrides FrameworkElementOnApplyTemplate.)
Public methodOnCommonPreviewHandlerLoaded
Controls implementing this interface must implement this eventhandler, which is called after the preview has been loaded.
Protected methodOnLoadPreview
Calls the LoadPreview event.
Protected methodOnPropertyChanged
Invoked whenever the effective value of any dependency property on this FrameworkElement has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides OnPropertyChanged(DependencyPropertyChangedEventArgs).
(Overrides FrameworkElementOnPropertyChanged(DependencyPropertyChangedEventArgs).)
Protected methodOnRenderSizeChanged
Raises the SizeChanged event, using the specified information as part of the eventual event data.
(Overrides FrameworkElementOnRenderSizeChanged(SizeChangedInfo).)
Protected methodOpen
Opens the given file.
Public methodRemoveCustomPreviewHandler
Removes the visual elements that were added using SetCustomPreviewHandler(UIElement). This is typically called in Unload
Public methodSelectedFileChange
Tries to display the preview or thumbnail of the file.
Public methodSetCustomPreviewHandler
Use this method to add the UI elements representing a custom preview to the ShellFilePreview control.
Top
Events
  NameDescription
Public eventAfterPreviewLoaded
Event that occurs after the preview has been loaded.
Public eventCode exampleLoadPreview
Event is thrown when a file is previewed. It can be implemented to control some aspects of the ShellFilePreview based on the current file or to set a custom preview control.
Top
Fields
  NameDescription
Public fieldStatic memberAutomaticRefreshProperty
Identifies the AutomaticRefresh dependency property.
Public fieldStatic memberLocationProperty
The DependencyProperty for ItemIdList.
Top
Remarks
Use this component to display a preview of a file. Depending on the installed PreviewHandlers not all files types support a preview. If no preview is registered, a thumbnail of the file is shown. You may use the Location dependency property to set a path to a file to load the preview of. The component is using the Preview Handlers registered in the system to display the files, so that normally the same files that Windows Explorer can preview should be supported. There are occasional problems concerning the bitness of the application using the ShellFilePreview vs. the bitness of the PreviewHandler registered for a filetype.
See Also