I want to create a custom Entry with a completely personalized visual.
For this, I created a CustomEntryHandler to modify the native view of the windows platform but I can't override the basic windows style which imports some effects :
- The background color that changes on over
- The bottom border that is displayed when entry is focused
- ...
I think I understood that this style comes from the default style of windows, in the generic.xaml file.
Does anyone know how I can override this ?
protected override TextBox CreatePlatformView()
{
var nativeView = new TextBox();
nativeView.Margin = new Microsoft.UI.Xaml.Thickness(0, 0, 0, 0);
nativeView.FocusVisualMargin = new Microsoft.UI.Xaml.Thickness(0, 0, 0, 0);
nativeView.BorderThickness = new Microsoft.UI.Xaml.Thickness(0,0,0,0);
nativeView.Padding = new Microsoft.UI.Xaml.Thickness(0, 0, 0, 0);
nativeView.CornerRadius = new Microsoft.UI.Xaml.CornerRadius(0);
nativeView.Background = new SolidColorBrush(Colors.Transparent);
return nativeView;
}
Screenshot of the entry focused with code above
UPDATE 11/10/22 : I also want to remove the Clear button of the TextBox.
Thanks in advance.