C# Class PoshCode.Controls.ThumbnailImage

======================================== .NET Framework 3.0 Custom Control ======================================== Follow steps 1a or 1b and then 2 to use this custom control in a XAML file. Step 1a) Using this custom control in a XAML file that exists in the current project. Add this XmlNamespace attribute to the root element of the markup file where it is to be used: xmlns:MyNamespace="clr-namespace:Thumbnailer" Step 1b) Using this custom control in a XAML file that exists in a different project. Add this XmlNamespace attribute to the root element of the markup file where it is to be used: xmlns:MyNamespace="clr-namespace:Thumbnailer;assembly=Thumbnailer" You will also need to add a project reference from the project where the XAML file lives to this project and Rebuild to avoid compilation errors: Right click on the target project in the Solution Explorer and "Add Reference"->"Projects"->[Browse to and select this project] Step 2) Go ahead and use your control in the XAML file. Note that Intellisense in the XML editor does not currently work on custom controls and its child elements.
Inheritance: System.Windows.Controls.Image, IDisposable
Afficher le fichier Open project: Jaykul/PoshConsole

Méthodes publiques

Свойство Type Description
ClientAreaOnlyProperty System.Windows.DependencyProperty
WindowSourceProperty System.Windows.DependencyProperty

Méthodes publiques

Méthode Description
Dispose ( ) : void
ThumbnailImage ( IntPtr source ) : System

Initializes a new instance of the ThumbnailImage class.

Méthodes protégées

Méthode Description
ArrangeOverride ( Size arrangeSize ) : Size

Positions elements and determines a size for the ThumbnailImage

Dispose ( bool disposing ) : void
MeasureOverride ( Size constraint ) : Size

Measures the size in layout required for child elements and determines a size for the Image.

Private Methods

Méthode Description
InitialiseThumbnail ( IntPtr source ) : void

Initialises the thumbnail image

OnClientAreaOnlyChanged ( DependencyObject depObj, System.Windows.DependencyPropertyChangedEventArgs args ) : void
OnWindowSourceChanged ( DependencyObject depObj, System.Windows.DependencyPropertyChangedEventArgs args ) : void
ReleaseThumbnail ( ) : void

Releases the thumbnail

ThumbnailImage ( ) : System

Initializes the ThumbnailImage class.

Thumbnail_LayoutUpdated ( object sender, EventArgs e ) : void

Handles the LayoutUpdated event of the Thumbnail image Actually, we really just ask Windows to paint us at our new size...

Thumbnail_Unloaded ( object sender, RoutedEventArgs e ) : void

Handles the Unloaded event of the Thumbnail control.

UpdateThumbnail ( ) : void

Updates the thumbnail

Method Details

ArrangeOverride() protected méthode

Positions elements and determines a size for the ThumbnailImage
protected ArrangeOverride ( Size arrangeSize ) : Size
arrangeSize System.Windows.Size The final area within the parent that this element should use to arrange itself and its children.
Résultat System.Windows.Size

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

MeasureOverride() protected méthode

Measures the size in layout required for child elements and determines a size for the Image.
protected MeasureOverride ( Size constraint ) : Size
constraint System.Windows.Size The available size that this element can give to child elements. /// Infinity can be specified as a value to indicate that the element will size to whatever content is available.
Résultat System.Windows.Size

ThumbnailImage() public méthode

Initializes a new instance of the ThumbnailImage class.
public ThumbnailImage ( IntPtr source ) : System
source System.IntPtr
Résultat System

Property Details

ClientAreaOnlyProperty public_oe static_oe property

public static DependencyProperty,System.Windows ClientAreaOnlyProperty
Résultat System.Windows.DependencyProperty

WindowSourceProperty public_oe static_oe property

public static DependencyProperty,System.Windows WindowSourceProperty
Résultat System.Windows.DependencyProperty