C# Class FirstFloor.ModernUI.Windows.Controls.BetterImage

Inheritance: System.Windows.Controls.Control
Afficher le fichier Open project: gro-ove/actools

Méthodes publiques

Свойство Type Description
ClearOnChangeProperty System.Windows.DependencyProperty
DecodeHeightProperty System.Windows.DependencyProperty
DecodeWidthProperty System.Windows.DependencyProperty
DelayedCreationProperty System.Windows.DependencyProperty
FilenameProperty System.Windows.DependencyProperty
ForceFillProperty System.Windows.DependencyProperty
HideBrokenProperty System.Windows.DependencyProperty
OptionBackgroundLoading bool
OptionCacheLimitSize int
OptionCacheTotalSize int
ShowBrokenProperty System.Windows.DependencyProperty
SourceProperty System.Windows.DependencyProperty
StretchDirectionProperty System.Windows.DependencyProperty
StretchProperty System.Windows.DependencyProperty

Private Properties

Свойство Type Description
AddToCache void
BetterImage System
ComputeScaleFactor System.Windows.Size
CreateDefaultStyles System.Windows.Style
GetCached BitmapEntry
LoadBitmapSourceFromBytes BitmapEntry
MeasureArrangeHelper System.Windows.Size
OnFilenameChanged void
OnFilenameChanged void
OnSourceChanged void
OnSourceChanged void
ReadAllBytesAsync Task
ReloadImage void
ReloadImageAsync void
ReloadImageAsyncOld void
RemoveFromCache void
UpdateLoaded void

Méthodes publiques

Méthode Description
LoadBitmapSource ( string filename, int decodeWidth = -1, int decodeHeight = -1 ) : BitmapEntry
LoadBitmapSourceAsync ( string filename, int decodeWidth = -1, int decodeHeight = -1 ) : Task
ReloadImage ( string filename ) : void

Forces all BetterImages which showing specific filename to reload their content.

Méthodes protégées

Méthode Description
ArrangeOverride ( Size arrangeSize ) : Size
MeasureOverride ( Size constraint ) : Size
OnRender ( System.Windows.Media.DrawingContext dc ) : void

Private Methods

Méthode Description
AddToCache ( string filename, BitmapEntry entry ) : void
BetterImage ( ) : System
ComputeScaleFactor ( Size availableSize, Size contentSize, Stretch stretch, StretchDirection stretchDirection ) : Size
CreateDefaultStyles ( ) : System.Windows.Style
GetCached ( string filename ) : BitmapEntry
LoadBitmapSourceFromBytes ( byte data, int decodeWidth = -1, int decodeHeight = -1, int attempt ) : BitmapEntry

Safe (handles all exceptions inside).

MeasureArrangeHelper ( Size inputSize ) : Size
OnFilenameChanged ( ) : void
OnFilenameChanged ( DependencyObject o, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnSourceChanged ( DependencyObject o, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnSourceChanged ( object newValue ) : void
ReadAllBytesAsync ( string filename, CancellationToken cancellation = default(CancellationToken) ) : Task
ReloadImage ( ) : void
ReloadImageAsync ( ) : void
ReloadImageAsyncOld ( ) : void
RemoveFromCache ( string filename ) : void
UpdateLoaded ( ) : void

Method Details

ArrangeOverride() protected méthode

protected ArrangeOverride ( Size arrangeSize ) : Size
arrangeSize System.Windows.Size
Résultat System.Windows.Size

LoadBitmapSource() public static méthode

public static LoadBitmapSource ( string filename, int decodeWidth = -1, int decodeHeight = -1 ) : BitmapEntry
filename string
decodeWidth int
decodeHeight int
Résultat BitmapEntry

LoadBitmapSourceAsync() public static méthode

public static LoadBitmapSourceAsync ( string filename, int decodeWidth = -1, int decodeHeight = -1 ) : Task
filename string
decodeWidth int
decodeHeight int
Résultat Task

MeasureOverride() protected méthode

protected MeasureOverride ( Size constraint ) : Size
constraint System.Windows.Size
Résultat System.Windows.Size

OnRender() protected méthode

protected OnRender ( System.Windows.Media.DrawingContext dc ) : void
dc System.Windows.Media.DrawingContext
Résultat void

ReloadImage() public static méthode

Forces all BetterImages which showing specific filename to reload their content.
public static ReloadImage ( string filename ) : void
filename string
Résultat void

Property Details

ClearOnChangeProperty public_oe static_oe property

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

DecodeHeightProperty public_oe static_oe property

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

DecodeWidthProperty public_oe static_oe property

Set to 0 if value shouldn’t be copied from Width.
public static DependencyProperty,System.Windows DecodeWidthProperty
Résultat System.Windows.DependencyProperty

DelayedCreationProperty public_oe static_oe property

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

FilenameProperty public_oe static_oe property

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

ForceFillProperty public_oe static_oe property

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

HideBrokenProperty public_oe static_oe property

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

OptionBackgroundLoading public_oe static_oe property

public static bool OptionBackgroundLoading
Résultat bool

OptionCacheLimitSize public_oe static_oe property

public static int OptionCacheLimitSize
Résultat int

OptionCacheTotalSize public_oe static_oe property

public static int OptionCacheTotalSize
Résultat int

ShowBrokenProperty public_oe static_oe property

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

SourceProperty public_oe static_oe property

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

StretchDirectionProperty public_oe static_oe property

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

StretchProperty public_oe static_oe property

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