-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search View #380
Search View #380
Conversation
Includes fix for the key used for display suggestion group header text being linked away in release.
public partial class SearchView : TemplatedView, INotifyPropertyChanged | ||
{ | ||
#pragma warning disable SA1306, SA1310, SX1309 // Field names should begin with lower-case letter | ||
private Entry? PART_Entry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were named on the assumption that there would be a TemplatePartAttribute
equivalent for Xamarin.Forms, but there doesn't appear to be. Am I missing something?
Visibility="{Binding SearchViewModel.Results.Count, Mode=OneWay, Converter={StaticResource CollectionIsEmptyToBoolConverter}, ConverterParameter='Empty'}"> | ||
<Grid> | ||
<ListView | ||
ItemTemplate="{StaticResource SuggestionTemplate}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was conflicted about how many customization properties it made sense to provide. It would be trivial to add properties for SuggestionTemplate
, ResultTemplate
, SourceTemplate
, etc, but then would it also make sense to SuggestionListStyle
, SuggestionListItemContainerStyle
, and so on? The UI is complicated enough that it may not make sense to change part without changing the whole thing.
private ISearchSource? _activeSource; | ||
private SearchResult? _selectedResult; | ||
private string? _currentQuery; | ||
private string? _defaultPlaceholder = "Find a place or address"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should support for localization with resx be included in new controls as MVP?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we already have a resx file you can use https://github.com/Esri/arcgis-toolkit-dotnet/blob/main/src/Toolkit/Toolkit/LocalizedStrings/Resources.resx
This should however be a property on the control, as it's a visual thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've filed an issue to track this work: #386
src/Toolkit/Toolkit/UI/Controls/SearchView/LocatorSearchSource.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just fix typo
Putting this up now to centralize discussion and get early feedback.
Updated OMD (2021-11-25):