Skip to content

Commit 488f11b

Browse files
authored
Update README.md
1 parent 9cc4fd5 commit 488f11b

File tree

1 file changed

+3
-38
lines changed

1 file changed

+3
-38
lines changed

README.md

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -43,47 +43,12 @@ class CustomNumericTextBoxRenderer_UWP : SfNumericTextBoxRenderer
4343
base.OnElementChanged(e);
4444
if (Control != null)
4545
{
46-
Control.Loaded += Control_Loaded;
46+
Control.ShowClearButton = false;
4747
}
48-
}
49-
50-
private void Control_Loaded(object sender, Windows.UI.Xaml.RoutedEventArgs e)
51-
{
5248
53-
FindChildControl<Button>(Control, "DeleteButton");
54-
}
55-
public DependencyObject FindChildControl<T>(DependencyObject control, string ctrlName)
56-
{
57-
int childNumber = VisualTreeHelper.GetChildrenCount(control);
58-
for (int i = 0; i < childNumber; i++)
59-
{
60-
DependencyObject child = VisualTreeHelper.GetChild(control, i);
61-
FrameworkElement FrameElement = child as FrameworkElement;
62-
if (FrameElement == null) return null;
63-
64-
if ((FrameElement is Grid))
65-
{
66-
UIElement FrameElementChild = (FrameElement as Grid).Children[1];
67-
if (FrameElementChild is Grid)
68-
{
69-
UIElement CloseButton = (FrameElementChild as Grid).Children[6];
70-
if ((CloseButton as Button).Name == ctrlName)
71-
{
72-
(CloseButton as Button).Width = 0;
73-
(CloseButton as Button).Height = 0;
74-
}
75-
}
76-
return child;
77-
}
78-
else
79-
{
80-
DependencyObject nextLevel = FindChildControl<T>(child, ctrlName);
81-
if (nextLevel != null)
82-
return nextLevel;
83-
}
84-
}
85-
return null;
8649
}
50+
51+
8752
}
8853
```
8954

0 commit comments

Comments
 (0)