Open
Description
Description
<SearchBar>
does not show the proper Keyboard setting. It can display the proper Keyboard after attaching a Renderer.<CustomSearchBar>
control does not inherit all Properties from<SearchBar>
in iOS.
Renderers
- iOS
namespace MauiBlazor.Platforms.iOS.Renderers
{
public class AcDaSearchBarRenderer : SearchBarRenderer
{
public AcDaSearchBarRenderer() : base()
{
}
protected override void OnElementChanged(ElementChangedEventArgs<SearchBar> e)
{
base.OnElementChanged(e);
}
}
}
- Android
namespace MauiBlazor.Platforms.Android.Renderers
{
public class AcDaSearchBarRenderer : SearchBarRenderer
{
public AcDaSearchBarRenderer(Context context) : base(context)
{
}
protected override void OnElementChanged(ElementChangedEventArgs<SearchBar> e)
{
base.OnElementChanged(e);
}
}
}
MauiProgram.cs
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
})
.UseMauiCompatibility()
.ConfigureMauiHandlers(handlers =>
{
#if ANDROID
// handlers.AddCompatibilityRenderer<CustomSearchBar,MauiBlazor.Platforms.Android.Renderers.AcDaSearchBarRenderer>();
handlers.AddCompatibilityRenderer<SearchBar,MauiBlazor.Platforms.Android.Renderers.AcDaSearchBarRenderer>();
#endif
#if IOS
// handlers.AddCompatibilityRenderer<CustomSearchBar,MauiBlazor.Platforms.iOS.Renderers.AcDaSearchBarRenderer>();
handlers.AddCompatibilityRenderer<SearchBar,MauiBlazor.Platforms.iOS.Renderers.AcDaSearchBarRenderer>();
#endif
});
CustomSearchBar
public class CustomSearchBar : SearchBar
{
public CustomSearchBar() : base()
{
}
}
Steps to Reproduce
- Create a MAUI project with /Blazor.
- Add a SearchBar to any XAML page. Set Keyboard to Numeric.
- Expect the behaviors shown in the table above.
Version with bug
6.0.400
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS
Did you find any workaround?
Yes but partial workarounds. Above in table.
Relevant log output
n/a
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
ghost commentedon Aug 29, 2022
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
ghost commentedon Sep 4, 2023
Hi @jbizcloud. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.
You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Zhanglirong-Winnie commentedon Sep 4, 2023
Verified this issue with Visual Studio Enterprise 17.8.0 Preview 1.0. Not repro on iOS and android platform.


Android:
iOS: