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

Inheritance: System.Windows.Controls.Control
ファイルを表示 Open project: gro-ove/actools

Public Properties

Property 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

Property 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

Public Methods

Method 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.

Protected Methods

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

Private Methods

Method 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 method

protected ArrangeOverride ( Size arrangeSize ) : Size
arrangeSize System.Windows.Size
return System.Windows.Size

LoadBitmapSource() public static method

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

LoadBitmapSourceAsync() public static method

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

MeasureOverride() protected method

protected MeasureOverride ( Size constraint ) : Size
constraint System.Windows.Size
return System.Windows.Size

OnRender() protected method

protected OnRender ( System.Windows.Media.DrawingContext dc ) : void
dc System.Windows.Media.DrawingContext
return void

ReloadImage() public static method

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

Property Details

ClearOnChangeProperty public_oe static_oe property

public static DependencyProperty,System.Windows ClearOnChangeProperty
return System.Windows.DependencyProperty

DecodeHeightProperty public_oe static_oe property

public static DependencyProperty,System.Windows DecodeHeightProperty
return 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
return System.Windows.DependencyProperty

DelayedCreationProperty public_oe static_oe property

public static DependencyProperty,System.Windows DelayedCreationProperty
return System.Windows.DependencyProperty

FilenameProperty public_oe static_oe property

public static DependencyProperty,System.Windows FilenameProperty
return System.Windows.DependencyProperty

ForceFillProperty public_oe static_oe property

public static DependencyProperty,System.Windows ForceFillProperty
return System.Windows.DependencyProperty

HideBrokenProperty public_oe static_oe property

public static DependencyProperty,System.Windows HideBrokenProperty
return System.Windows.DependencyProperty

OptionBackgroundLoading public_oe static_oe property

public static bool OptionBackgroundLoading
return bool

OptionCacheLimitSize public_oe static_oe property

public static int OptionCacheLimitSize
return int

OptionCacheTotalSize public_oe static_oe property

public static int OptionCacheTotalSize
return int

ShowBrokenProperty public_oe static_oe property

public static DependencyProperty,System.Windows ShowBrokenProperty
return System.Windows.DependencyProperty

SourceProperty public_oe static_oe property

public static DependencyProperty,System.Windows SourceProperty
return System.Windows.DependencyProperty

StretchDirectionProperty public_oe static_oe property

public static DependencyProperty,System.Windows StretchDirectionProperty
return System.Windows.DependencyProperty

StretchProperty public_oe static_oe property

public static DependencyProperty,System.Windows StretchProperty
return System.Windows.DependencyProperty