C# Класс 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.
Наследование: System.Windows.Controls.Image, IDisposable
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
ClientAreaOnlyProperty System.Windows.DependencyProperty
WindowSourceProperty System.Windows.DependencyProperty

Открытые методы

Метод Описание
Dispose ( ) : void
ThumbnailImage ( IntPtr source ) : System

Initializes a new instance of the ThumbnailImage class.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

ArrangeOverride() защищенный Метод

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.
Результат System.Windows.Size

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

MeasureOverride() защищенный Метод

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.
Результат System.Windows.Size

ThumbnailImage() публичный Метод

Initializes a new instance of the ThumbnailImage class.
public ThumbnailImage ( IntPtr source ) : System
source System.IntPtr
Результат System

Описание свойств

ClientAreaOnlyProperty публичное статическое свойство

public static DependencyProperty,System.Windows ClientAreaOnlyProperty
Результат System.Windows.DependencyProperty

WindowSourceProperty публичное статическое свойство

public static DependencyProperty,System.Windows WindowSourceProperty
Результат System.Windows.DependencyProperty