C# Class BaconographyWP8.View.ScalingGifView

Inheritance: System.Windows.Controls.UserControl
Exibir arquivo Open project: Synergex/Baconography

Public Properties

Property Type Description
ImageSourceProperty System.Windows.DependencyProperty

Public Methods

Method Description
CoerceScale ( bool recompute ) : void

Coerce the scale into being within the proper range. Optionally compute the constraints on the scale so that it will always fill the entire screen and will never get too big to be contained in a hardware surface.

ResizeImage ( bool center ) : void

Adjust the size of the image according to the coerced scale factor. Optionally center the image, otherwise, try to keep the original midpoint of the pinch in the same spot on the screen regardless of the scale.

ScalingGifView ( ) : System.Linq
ScalingGifView_Loaded ( object sender, RoutedEventArgs e ) : void
viewport_ViewportChanged ( object sender, System e ) : void

Either the user has manipulated the image or the size of the viewport has changed. We only care about the size.

Private Methods

Method Description
CoerceScaleImpl ( double viewWidth, double viewHeight, double bitmapWidth, double bitmapHeight, double scale ) : double>.Tuple
SetContentProvider ( byte asset ) : void
SetContentProvider ( string sourceUrl ) : void
myGridGestureListener_DoubleTap ( object sender, Microsoft e ) : void
myGridGestureListener_PinchCompleted ( object sender, Microsoft.Phone.Controls.PinchGestureEventArgs e ) : void
myGridGestureListener_PinchDelta ( object sender, Microsoft.Phone.Controls.PinchGestureEventArgs e ) : void
myGridGestureListener_PinchStarted ( object sender, Microsoft.Phone.Controls.PinchStartedGestureEventArgs e ) : void

Method Details

CoerceScale() public method

Coerce the scale into being within the proper range. Optionally compute the constraints on the scale so that it will always fill the entire screen and will never get too big to be contained in a hardware surface.
public CoerceScale ( bool recompute ) : void
recompute bool Will recompute the min max scale if true.
return void

ResizeImage() public method

Adjust the size of the image according to the coerced scale factor. Optionally center the image, otherwise, try to keep the original midpoint of the pinch in the same spot on the screen regardless of the scale.
public ResizeImage ( bool center ) : void
center bool
return void

ScalingGifView() public method

public ScalingGifView ( ) : System.Linq
return System.Linq

ScalingGifView_Loaded() public method

public ScalingGifView_Loaded ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
return void

viewport_ViewportChanged() public method

Either the user has manipulated the image or the size of the viewport has changed. We only care about the size.
public viewport_ViewportChanged ( object sender, System e ) : void
sender object
e System
return void

Property Details

ImageSourceProperty public_oe static_oe property

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