Open dotMorten opened 6 years ago
Useful reference implementations. FontFamily/FontSize: https://github.com/xamarin/Xamarin.Forms/blob/ffa53d31137b61e34192521cc10aae5c151d0c98/Xamarin.Forms.Platform.UAP/EntryRenderer.cs#L149-L181
PlaceHolderTextColor: https://github.com/xamarin/Xamarin.Forms/blob/ffa53d31137b61e34192521cc10aae5c151d0c98/Xamarin.Forms.Platform.UAP/EntryRenderer.cs#L217-L226
dotMorten, How to change border and Text color for this control? Thanks,
Set the TextColor property. Note this property isn't in the released version yet so you need to build the library yourself from the master branch
...there are no border property at this point
dotMorten, Can you please refer this link? https://github.com/dotMorten/XamarinFormsControls/tree/master/AutoSuggestBox
As they mentioned UWP : Black Color Theme Android : White Color Theme IOS : White With Line separator Theme
I'm currently running on Android mobile still getting Balck color Theme only. Any suggestions why I'm getting like this?
Thanks,
TextColor and PlaceholderTextColor added.
One approach to supporting visual overrides is to inherent from Entry
. You may not use its renderer, depending on the platform, but it will give you all the visual properties in a way that is familiar to Xamarin developers.
Entry's native element doesn't support drop-down on all platforms.
Understood. On those platforms, you'll need to replace the renderer used by Entry
with your renderer that uses native elements that do support drop-down. However, by deriving from Entry
, your renderer will have access to all of Entry
's properties for formatting the native elements.
That won't really help. All I would save would be writing the properties which is trivial. It's hooking them up to the native elements that are less so. And even worse I'd inherit properties in not interested in implementing. In any case the goal of the control is to port AutoSuggestBox to Forms and follow it's object model (which isn't inheriting from TextBox if I recall correctly)
From a usage perspective, an app's styles and helpers designed to work with Entry
would continue to work. There may also be opportunity to use parts of the Entry
s renders (through I haven't checked), which may help with the properties that may be of less interest but still enough that Entry
included them.
Basing the design on a single native control, rather than an abstract UI concept, differs from the typical Xamarin.Forms approach, and could box in the design of the control long term. Ironically, the abstract design approach stated in the project readme does use an abstract UI concept, completely in line with Xamarin.Forms design principles:
Represents a text control that makes suggestions to users as they type. The app is notified when text has been changed by the user and is responsible for providing relevant suggestions for this control to display.
basing the design on a single native control, rather than an abstract UI concept
It's where I think XF went down the wrong path, and this being my repo I'm free to choose the pattern I find right.
Also it's a breaking change I'm not up for making
Hi, is there any update on FontSize property?