Example #1
0
 /// <summary>
 /// Gets the scaling mode for the image.
 /// </summary>
 /// <param name="view">Target view</param>
 /// <returns>A Aspect representing the scaling mode of the image.</returns>
 public static Aspect GetAspect(this ImageView view)
 {
     return(view.FittingMode switch
     {
         Tizen.NUI.FittingModeType.ScaleToFill => Aspect.AspectFill,
         Tizen.NUI.FittingModeType.ShrinkToFit => Aspect.AspectFit,
         _ => Aspect.Fill,
     });
Example #2
0
 /// <summary>
 /// Sets the scaling mode for the image.
 /// </summary>
 /// <param name="view">Target view</param>
 /// <param name="apect">A Aspect representing the scaling mode of the image.</param>
 public static void SetAspect(this ImageView view, Aspect apect)
 {
     view.FittingMode = apect switch
     {
         Aspect.AspectFill => Tizen.NUI.FittingModeType.ScaleToFill,
         Aspect.AspectFit => Tizen.NUI.FittingModeType.ShrinkToFit,
         _ => Tizen.NUI.FittingModeType.Fill,
     };
 }
Example #3
0
 internal ImageView(Tizen.NUI.BaseComponents.ImageView nuiInstance) : base(nuiInstance)
 {
     SetNUIInstance(nuiInstance);
 }
Example #4
0
 public static ImageView DownCast(BaseHandle handle)
 {
     Tizen.NUI.BaseComponents.ImageView result = Tizen.NUI.BaseComponents.ImageView.DownCast(handle.handleInstance) as Tizen.NUI.BaseComponents.ImageView;
     return(BaseHandle.GetHandle(result) as ImageView);
 }