[NUI] Modify SwitchSample and warnings
authorzhouleonlei <zhouleon.lei@samsung.com>
Fri, 11 Dec 2020 08:46:01 +0000 (16:46 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 15 Dec 2020 06:33:59 +0000 (15:33 +0900)
src/Tizen.NUI.Components/Controls/Control.cs
test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/SwitchSample.cs

index 7b52b7c..06ba3c2 100755 (executable)
@@ -35,11 +35,11 @@ namespace Tizen.NUI.Components
     {
         /// Internal used.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static readonly BindableProperty CommandProperty = BindableProperty.Create("Command", typeof(ICommand), typeof(Control), null, propertyChanged: (bo, o, n) => ((Control)bo).OnCommandChanged());
+        public static readonly BindableProperty CommandProperty = BindableProperty.Create(nameof(Command), typeof(ICommand), typeof(Control), null, propertyChanged: (bo, o, n) => ((Control)bo).OnCommandChanged());
 
         /// Internal used.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static readonly BindableProperty CommandParameterProperty = BindableProperty.Create("CommandParameter", typeof(object), typeof(Button), null,
+        public static readonly BindableProperty CommandParameterProperty = BindableProperty.Create(nameof(CommandParameter), typeof(object), typeof(Button), null,
             propertyChanged: (bindable, oldvalue, newvalue) => ((Button)bindable).CommandCanExecuteChanged(bindable, EventArgs.Empty));
 
         private bool onThemeChangedEventOverrideChecker;
index 33c1502..50e152b 100755 (executable)
@@ -225,6 +225,7 @@ namespace Tizen.NUI.Samples
                 utilitySwitch[i].ApplyStyle(utilitySt);
                 utilitySwitch[i].Size = new Size(96, 60);
                 utilitySwitch[i].Margin = new Extents(100, 0, 20, 0);
+                utilitySwitch[i].IsTapGestureFeedback = true;
                 parentView[2].Add(utilitySwitch[i]);
             }
             for (i = 0; i < 4; i++)
@@ -232,6 +233,7 @@ namespace Tizen.NUI.Samples
                 familySwitch[i] = new Switch();
                 familySwitch[i].ApplyStyle(familySt);
                 familySwitch[i].Size = new Size(96, 60);
+                familySwitch[i].IsTapGestureFeedback = true;
                 parentView[2].Add(familySwitch[i]);
             }
             for (i = 0; i < 4; i++)
@@ -239,6 +241,7 @@ namespace Tizen.NUI.Samples
                 foodSwitch[i] = new Switch();
                 foodSwitch[i].ApplyStyle(foodSt);
                 foodSwitch[i].Size = new Size(96, 60);
+                foodSwitch[i].IsTapGestureFeedback = true;
                 parentView[2].Add(foodSwitch[i]);
             }
             for (i = 0; i < 4; i++)
@@ -246,6 +249,7 @@ namespace Tizen.NUI.Samples
                 kitchenSwitch[i] = new Switch();
                 kitchenSwitch[i].ApplyStyle(kitchenSt);
                 kitchenSwitch[i].Size = new Size(96, 60);
+                kitchenSwitch[i].IsTapGestureFeedback = true;
                 parentView[2].Add(kitchenSwitch[i]);
             }
 
@@ -255,6 +259,7 @@ namespace Tizen.NUI.Samples
                 utilitySwitch2[i] = new Switch();
                 utilitySwitch2[i].ApplyStyle(utilitySt);
                 utilitySwitch2[i].Size = new Size(96, 60);
+                utilitySwitch2[i].IsTapGestureFeedback = true;
                 parentView[2].Add(utilitySwitch2[i]);
             }
             for (i = 0; i < 4; i++)
@@ -262,6 +267,7 @@ namespace Tizen.NUI.Samples
                 familySwitch2[i] = new Switch();
                 familySwitch2[i].ApplyStyle(familySt);
                 familySwitch2[i].Size = new Size(96, 60);
+                familySwitch2[i].IsTapGestureFeedback = true;
                 parentView[2].Add(familySwitch2[i]);
             }
             for (i = 0; i < 4; i++)
@@ -269,6 +275,7 @@ namespace Tizen.NUI.Samples
                 foodSwitch2[i] = new Switch();
                 foodSwitch2[i].ApplyStyle(foodSt);
                 foodSwitch2[i].Size = new Size(96, 60);
+                foodSwitch2[i].IsTapGestureFeedback = true;
                 parentView[2].Add(foodSwitch2[i]);
             }
             for (i = 0; i < 4; i++)
@@ -276,6 +283,7 @@ namespace Tizen.NUI.Samples
                 kitchenSwitch2[i] = new Switch();
                 kitchenSwitch2[i].ApplyStyle(kitchenSt);
                 kitchenSwitch2[i].Size = new Size(96, 60);
+                kitchenSwitch2[i].IsTapGestureFeedback = true;
                 parentView[2].Add(kitchenSwitch2[i]);
             }