This is a migrated thread and some comments may be shown as answers.

App crash ContentPage with RadAutoComplete

4 Answers 169 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
Shalin
Top achievements
Rank 1
Shalin asked on 15 Mar 2018, 01:37 PM

hi,

i have implemented rad auto complete succesfuly and its work perfect in android.

But when it comes to iOS, app crashes when i open page which contains RadAutoComplete. if i remove it page open and no crash.

Question - How to fix this ?

Error message

"NaN is not a valid value for width"

StackTrace

  at Xamarin.Forms.Size..ctor (System.Double width, System.Double height) [0x00008] in D:\agent_work\1\s\Xamarin.Forms.Core\Size.cs:19 
  at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:464 
  at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:535 
  at Xamarin.Forms.Grid.ExpandLastAutoColumnIfNeeded (System.Double width, System.Boolean expandToRequest) [0x00058] in D:\agent_work\1\s\Xamarin.Forms.Core\GridCalc.cs:337 
  at Xamarin.Forms.Grid.MeasureGrid (System.Double width, System.Double height, System.Boolean requestSize) [0x0013a] in D:\agent_work\1\s\Xamarin.Forms.Core\GridCalc.cs:520 
  at Xamarin.Forms.Grid.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0002a] in D:\agent_work\1\s\Xamarin.Forms.Core\GridCalc.cs:58 
  at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:601 
  at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:477 
  at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\agent_work\1\s\Xamarin.Forms.Core\Layout.cs:121 
  at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:535 
  at Xamarin.Forms.ScrollView.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x0006d] in D:\agent_work\1\s\Xamarin.Forms.Core\ScrollView.cs:183 
  at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x0014b] in D:\agent_work\1\s\Xamarin.Forms.Core\Layout.cs:245 
  at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\agent_work\1\s\Xamarin.Forms.Core\Layout.cs:205 
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:637 
  at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:788 
  at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:159 
  at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:519 
  at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x0016b] in D:\agent_work\1\s\Xamarin.Forms.Core\Layout.cs:159 
  at Xamarin.Forms.Grid.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00144] in D:\agent_work\1\s\Xamarin.Forms.Core\GridCalc.cs:48 
  at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x0014b] in D:\agent_work\1\s\Xamarin.Forms.Core\Layout.cs:245 
  at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\agent_work\1\s\Xamarin.Forms.Core\Layout.cs:205 
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:637 
  at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:788 
  at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:159 
  at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:519 
  at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x0016b] in D:\agent_work\1\s\Xamarin.Forms.Core\Layout.cs:159 
  at Xamarin.Forms.Page.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x0010d] in D:\agent_work\1\s\Xamarin.Forms.Core\Page.cs:181 
  at Xamarin.Forms.Page.UpdateChildrenLayout () [0x000c6] in D:\agent_work\1\s\Xamarin.Forms.Core\Page.cs:253 
  at Xamarin.Forms.Page.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\agent_work\1\s\Xamarin.Forms.Core\Page.cs:234 
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:637 
  at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:788 
  at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:159 
  at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:519 
  at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x0000a] in D:\agent_work\1\s\Xamarin.Forms.Core\Layout.cs:131 
  at Xamarin.Forms.Page.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x0010d] in D:\agent_work\1\s\Xamarin.Forms.Core\Page.cs:181 
  at Xamarin.Forms.Page.UpdateChildrenLayout () [0x000c6] in D:\agent_work\1\s\Xamarin.Forms.Core\Page.cs:253 
  at Xamarin.Forms.Page.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\agent_work\1\s\Xamarin.Forms.Core\Page.cs:234 
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:637 
  at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:788 
  at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:159 
  at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:519 
  at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x0000a] in D:\agent_work\1\s\Xamarin.Forms.Core\Layout.cs:131 
  at Xamarin.Forms.Page.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x0010d] in D:\agent_work\1\s\Xamarin.Forms.Core\Page.cs:181 
  at Xamarin.Forms.Page.UpdateChildrenLayout () [0x000c6] in D:\agent_work\1\s\Xamarin.Forms.Core\Page.cs:253 
  at Xamarin.Forms.Page.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\agent_work\1\s\Xamarin.Forms.Core\Page.cs:234 
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:637 
  at Xamarin.Forms.Page.OnChildMeasureInvalidated (Xamarin.Forms.VisualElement child, Xamarin.Forms.Internals.InvalidationTrigger trigger) [0x000a9] in D:\agent_work\1\s\Xamarin.Forms.Core\Page.cs:292 
  at Xamarin.Forms.Page.OnChildMeasureInvalidated (System.Object sender, System.EventArgs e) [0x00013] in D:\agent_work\1\s\Xamarin.Forms.Core\Page.cs:216 
  at Xamarin.Forms.VisualElement.InvalidateMeasureInternal (Xamarin.Forms.Internals.InvalidationTrigger trigger) [0x0000b] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:669 
  at Xamarin.Forms.VisualElement.set_IsPlatformEnabled (System.Boolean value) [0x0001c] in D:\agent_work\1\s\Xamarin.Forms.Core\VisualElement.cs:377 
  at Xamarin.Forms.Platform.iOS.Platform+<>c.<.cctor>b__51_0 (Xamarin.Forms.BindableObject bindable, System.Object oldvalue, System.Object newvalue) [0x0000a] in <bc5a3d4303744676b3b36f4254bb697d>:0 
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x0011b] in D:\agent_work\1\s\Xamarin.Forms.Core\BindableObject.cs:605 
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0015b] in D:\agent_work\1\s\Xamarin.Forms.Core\BindableObject.cs:399 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x0005f] in D:\agent_work\1\s\Xamarin.Forms.Core\BindableObject.cs:552 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in D:\agent_work\1\s\Xamarin.Forms.Core\BindableObject.cs:92 
  at Xamarin.Forms.Platform.iOS.Platform.SetRenderer (Xamarin.Forms.VisualElement bindable, Xamarin.Forms.Platform.iOS.IVisualElementRenderer value) [0x00000] in <bc5a3d4303744676b3b36f4254bb697d>:0 
  at Xamarin.Forms.Platform.iOS.NavigationRenderer.CreateViewControllerForPage (Xamarin.Forms.Page page) [0x0000f] in <bc5a3d4303744676b3b36f4254bb697d>:0 
  at Xamarin.Forms.Platform.iOS.NavigationRenderer+<OnPushAsync>d__45.MoveNext () [0x00016] in <bc5a3d4303744676b3b36f4254bb697d>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357 
  at Xamarin.Forms.NavigationPage+<PushAsyncInner>d__79.MoveNext () [0x00095] in D:\agent_work\1\s\Xamarin.Forms.Core\NavigationPage.cs:360 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113 
  at Xamarin.Forms.NavigationPage+<PushAsync>d__52.MoveNext () [0x0017f] in D:\agent_work\1\s\Xamarin.Forms.Core\NavigationPage.cs:200 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113 
  at Medarbeideren.ViewModels.Implementations.MainPageViewModel+<<get_AddNewAppmntCommand>b__24_0>d.MoveNext () [0x00270] in /Users/xamarindev/Documents/Medarbeideren/Medar_UI/Medarbeideren/Medarbeideren/Medarbeideren/ViewModels/Implementations/MainPageViewModel.cs:164 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018 
  at UIKit.UIKitSynchronizationContext+<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/UIKit/UIKitSynchronizationContext.cs:24 
  at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/Foundation/NSAction.cs:163 
  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/UIKit/UIApplication.cs:79 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.8.0.20/src/Xamarin.iOS/UIKit/UIApplication.cs:63 
  at Medarbeideren.iOS.Application.Main (System.String[] args) [0x00001] in /Users/xamarindev/Documents/Medarbeideren/Medar_UI/Medarbeideren/Medarbeideren/Medarbeideren.iOS/Main.cs:17 

UI structure

<Grid Grid.Row="8" Grid.ColumnSpan="5">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Label Style="{StaticResource AppointmentViewLabelStyle}" Text="{i18n:Translate APPOINT_OWNER}"
                               VerticalOptions="Center"/>
                        <Frame x:Name="ownerautocomplete" Grid.Row="1"  Style="{StaticResource CommonFrameStyle}">
                            <telerikInput:RadAutoComplete  x:Name="AutoCompleteOwner" ItemsSource="{Binding ContactsListOwner,Mode=TwoWay}"                                                                                                                    
                                                           Watermark="{i18n:Translate SEARCH_SEARCH_RESOURCES}"                                                           
                                                           DisplayMode="Plain"
                                                           Margin="0" BorderColor="Transparent" TextSearchPath="Name"                                                          
                                                           NoResultsMessage="{i18n:Translate SEARCH_SEARCH_NO_RESULT}"
                                                           FontFamily="{StaticResource PlatformBaseFontFamily}"
                                                           SuggestionViewBackgroundColor="White"
                                                           SuggestionItemSelected="AutoCompleteOwner_SuggestionItemSelected"/>
                        </Frame>
                         
 
                       
                    </Grid>

4 Answers, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 15 Mar 2018, 06:38 PM
Hi Shalin,

I tested your shared code and am not able to reproduce the issue using the latest release of UI for Xamarin (v.2018.1.315, released today).

Here is a screenshot at runtime:



Note: Because you only shared the XAML, I used a list of strings for the items source.

AutoCompleteOwner.ItemsSource = new List<string> {"One", "Two", "Three", "Four", "Five"};


In the stack trace, it describes a measurement problem with the last column in the Grid nested in a ScrollView. You could try giving the RadAutoComplete (or a parent) a definitive width to prevent that NaN (infinite) measurement.

<Frame x:Name="ownerautocomplete" Grid.Row="1" WidthRequest="400" >
    <input:RadAutoComplete  x:Name="AutoCompleteOwner" .../>
</Frame>

or try binding the RadAutoComplete's width to the Frame's measured width:

<Frame x:Name="ownerautocomplete" Grid.Row="1" >
    <input:RadAutoComplete  x:Name="AutoCompleteOwner"
            WidthRequest="{Binding Width, Source={x:Reference ownerautocomplete}}" />
</Frame>


Lastly, there is no need to have TwoWay binding for the ItemsSource. The RadAutoComplete will not replace the bound collection so you can use the default OneWay binding:

ItemsSource="{Binding ContactsListOwner}"
 

Further Investigation

If none of these suggestions work, the problem resides somewhere else and we'll need to debug the problem directly. In order to do this, we'll need a runnable demo that isolates and reproduces the issue.

You can open a support ticket here and attach the demo, or reply here with a link to download it (be sure to delete the bin and obj folders before zipping).

Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Shalin
Top achievements
Rank 1
answered on 16 Mar 2018, 05:09 AM

hello,

Thank you very much for your quick reply and valuable suggestions.

Setting the width to RadAutoComplete did the trick. now it works perfectly.

WidthRequest="100"

But setting it like this throws same error,

WidthRequest="{Binding Width, Source={x:Reference ownerautocomplete}}"

 

But without setting it controller must take width from grid or parent its in. Maybe from next release :) . Looking forward.

  1. And also we need a capability of setting default value on autocomplete when user first sees it then user can search.
  2. Focused event not firing when we start typing or at the time soft keyboard pops up, both iOS and Andoid
0
Shalin
Top achievements
Rank 1
answered on 16 Mar 2018, 05:23 AM

Another question

3) In Android, keyboard is not hide after selecting suggested value. need to press back button

0
Lance | Manager Technical Support
Telerik team
answered on 16 Mar 2018, 08:55 PM
Hello Shalin,

I'm happy to see the the explicit WidthRequest worked for you! Note that this is a stop-gap to prevent an infinite measurement. The expected behavior is to use the restraints of the parent's content dimension, this is why I cannot replicate the exception you're seeing. 

If you're still willing to share the rest of that ContentPage (specifically the parent visual tree structure), I can give it to the development team to investigate further. This would allow then to determine if there needs to be a control fix or not for that scenario. 

To answer your other questions:

- Default Value: You can set the value of AutoComplete.Text if you want a value in the box prior to user selection.

- Focus Events: I was able to replicate this and have logged it for the development team to investigate further. You can up-vote and follow the AutoComplete: Focus Events Not Firing Feedback Portal item

- Keyboard visible after selection: This is expected behavior. The keyboard is still visible because the cursor is still in the control after a selection is made. If you don't want this behavior, you can hook into the SuggestionItemSelected event and put the focus on another control.


If you have any further questions, please open a new forum thread for each discrete topic. This is not only to prevent delay in getting you answer now, but also makes it easier for you to search later if it's not nested under a different topic.

If you have any further product feedback, please add it to the UI for Xamarin Feedback Portal. This is tied directly to the development team's items and allows us to prioritize features and fixes for upcoming product updates.

Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
AutoComplete
Asked by
Shalin
Top achievements
Rank 1
Answers by
Lance | Manager Technical Support
Telerik team
Shalin
Top achievements
Rank 1
Share this question
or