This is a property that allows you to have focus even when touched.
If Focusable is false, FocusableInTouchMode is disabled.
If you want to have focus on touch in touch mode, you need to set both settings to true.
focusable = true,
focusableInTouch = true,
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Actor_IsKeyboardFocusable")]
public static extern bool IsKeyboardFocusable(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Actor_SetTouchFocusable")]
+ public static extern void SetFocusableInTouch(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Actor_IsTouchFocusable")]
+ public static extern bool IsFocusableInTouch(global::System.Runtime.InteropServices.HandleRef jarg1);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Actor_SetSizeScalePolicy")]
public static extern void SetSizeScalePolicy(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
{
private bool disposed = false;
private bool? focusable;
+ private bool? focusableInTouch;
private bool? positionUsesPivotPoint;
private Position parentOrigin;
private Position pivotPoint;
set => SetValue(FocusableProperty, value);
}
+ /// <summary>
+ /// Whether this view can focus by touch.
+ /// If Focusable is false, FocusableInTouch is disabled.
+ /// If you want to have focus on touch, you need to set both Focusable and FocusableInTouch settings to true.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool? FocusableInTouch
+ {
+ get => (bool?)GetValue(FocusableInTouchProperty);
+ set => SetValue(FocusableInTouchProperty, value);
+ }
+
/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[Obsolete("Deprecated. Please use Size instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
defaultValueCreator: (bindable) => ((ViewStyle)bindable).focusable
);
+ /// <summary> Bindable property of FocusableInTouch. Please do not open it. </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty FocusableInTouchProperty = BindableProperty.Create(nameof(FocusableInTouch), typeof(bool?), typeof(ViewStyle), null,
+ propertyChanged: (bindable, oldValue, newValue) => ((ViewStyle)bindable).focusableInTouch = (bool?)newValue,
+ defaultValueCreator: (bindable) => ((ViewStyle)bindable).focusableInTouch
+ );
+
/// <summary> Bindable property of Focusable. Please do not open it. </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty Size2DProperty = BindableProperty.Create(nameof(Size2D), typeof(Size2D), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
}
/// <summary>
+ /// Whether this view can focus by touch.
+ /// If Focusable is false, FocusableInTouch is disabled.
+ /// If you want to have focus on touch, you need to set both Focusable and FocusableInTouch settings to true.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool FocusableInTouch
+ {
+ set
+ {
+ SetValue(FocusableInTouchProperty, value);
+ NotifyPropertyChanged();
+ }
+ get
+ {
+ return (bool)GetValue(FocusableInTouchProperty);
+ }
+ }
+
+ /// <summary>
/// Retrieves the position of the view.<br />
/// The coordinates are relative to the view's parent.<br />
/// </summary>
});
/// <summary>
+ /// FocusableInTouchProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty FocusableInTouchProperty = BindableProperty.Create(nameof(FocusableInTouch), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null) { view.SetFocusableInTouch((bool)newValue); }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+ return view.IsFocusableInTouch();
+ });
+
+ /// <summary>
/// Size2DProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
}
else
{
- view.SetShadow((ImageShadow)newValue);
+ view.SetShadow((ImageShadow)newValue);
}
}),
defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
}
else
{
- view.SetShadow((Shadow)newValue);
+ view.SetShadow((Shadow)newValue);
}
}),
defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
.Add(Visual.Property.BorderlineWidth, new PropertyValue(backgroundExtraData.BorderlineWidth))
.Add(Visual.Property.BorderlineColor, new PropertyValue(backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor)))
.Add(Visual.Property.BorderlineOffset, new PropertyValue(backgroundExtraData.BorderlineOffset));
-
+
Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
}
return ret;
}
+ internal void SetFocusableInTouch(bool enabled)
+ {
+ Interop.ActorInternal.SetFocusableInTouch(SwigCPtr, enabled);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ internal bool IsFocusableInTouch()
+ {
+ bool ret = Interop.ActorInternal.IsFocusableInTouch(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
{
Interop.Actor.SetResizePolicy(SwigCPtr, (int)policy, (int)dimension);