Comments (16)
I do recall fighting with this when I built it, however I thought I had it licked.
Can you please comment back with your layout for a repro?
Is this it?
<ContentPage>
<ScrollView>
<StackLayout>
<xfx:XfxComboBox />
</StackLayout>
<ScrollView>
</ContentPage>
from xfx.controls.
It happened in 3 case
- Place Combobox in second layer
- Place combobox in custom control then place that control in scrollview
- Combobox is out of view at first time because content of scrollview is too long. => Fixed by forcing re-draw when it focused.
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
base.OnElementPropertyChanged(sender, e);
if (e.PropertyName == Entry.IsPasswordProperty.PropertyName)
KillPassword();
if (e.PropertyName == XfxComboBox.ItemsSourceProperty.PropertyName)
SetItemsSource();
else if (e.PropertyName == XfxComboBox.ThresholdProperty.PropertyName)
SetThreshold();
else if (e.PropertyName == "IsFocused")
SetNeedsDisplay();
}
from xfx.controls.
I've got views with exactly that, and "it works on my machine", however point 3 intrigues me. I'll have to test that one.
from xfx.controls.
@closetoyou293 what I really need here is what your markup looks like. Can you just copy/paste the relevant XAML?
from xfx.controls.
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:forms="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"
xmlns:xfx="clr-namespace:Xfx;assembly=HomeCreditMock"
x:Class="Test.Controls.CustomCombobox">
<Grid x:Name="Root" Padding="0" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<xfx:XfxComboBox x:Name="ComboBox" Grid.Column="0" Grid.ColumnSpan="2" />
<forms:CachedImage Grid.Column="1"
Source="arrorDropdown"
HorizontalOptions="Center"
VerticalOptions="Center"
HeightRequest="10"
WidthRequest="20">
<forms:CachedImage.GestureRecognizers>
<TapGestureRecognizer Tapped="OnTapped"></TapGestureRecognizer>
</forms:CachedImage.GestureRecognizers>
</forms:CachedImage>
</Grid>
</ContentView>
from xfx.controls.
<ScrollView>
<StackLayout HorizontalOptions="FillAndExpand"
Padding="10"
VerticalOptions="FillAndExpand">
<controls:CustomCombobox HorizontalOptions="FillAndExpand"
PlaceHolder="{Binding [RelativeInfo_Relationship]}"
ItemsSource="{Binding RelatedTypes}"
ItemDisplay="Description"
SelectedItem="{Binding FirstRelativeRelationship}"
Margin="20,1,20,1" />
</StackLayout>
</ScrollView>
from xfx.controls.
That scroll view is placed in ContentView. Please put some control so that combobox is only shown when you scroll down, then you will see the bug I mentioned.
Sorry for bad format in my comment :)
from xfx.controls.
Hi, I was experiencing the same issue and was able to fix it, at least for my specific use-case, by adding the following code to the Draw(...) Method of MbAutoCompleteTextField:
_drawnFrame = Superview.ConvertRectToView(_drawnFrame, UIApplication.SharedApplication.KeyWindow);
view = _parentViewController.View;
frame = new CGRect(_drawnFrame.X, _drawnFrame.Bottom, _drawnFrame.Width, AutocompleteTableViewHeight);
from xfx.controls.
@LariscusObscurus are you interested in submitting a PR?
from xfx.controls.
I met the same issue, only on iOS
Here's code which can reproduce this
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:xfx="clr-namespace:Xfx;assembly=Xfx.Controls"
xmlns:app="clr-namespace:Xfx.Controls.Example.Features.Controls;assembly=Xfx.Controls.Example"
x:Class="Xfx.Controls.Example.Features.Controls.ControlsPage"
ControlTemplate="{StaticResource TestTemplate}"
Title="Custom Controls Example">
<ContentPage.BindingContext>
<app:MainPageModel />
</ContentPage.BindingContext>
<ContentPage.Resources>
<ResourceDictionary>
<Style TargetType="Label">
<Setter Property="VerticalTextAlignment" Value="Center" />
</Style>
<ControlTemplate x:Key="TestTemplate">
<ScrollView>
<Grid Padding="20">
<ContentPresenter Margin="0,10,0,0" />
</Grid>
</ScrollView>
</ControlTemplate>
</ResourceDictionary>
</ContentPage.Resources>
<Grid RowSpacing="0" ColumnSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Text="ComboBox" />
<xfx:XfxComboBox Grid.Row="0"
Grid.Column="1"
Placeholder="Enter your email address"
ActivePlaceholderColor="BlueViolet"
ItemSelected="Email_ItemSelected"
Focused="Email_OnFocused"
Unfocused="Email_OnUnfocused"
SelectedItem="{Binding SelectedItem}"
Text="{Binding EmailAddress}"
ItemsSource="{Binding EmailSuggestions}"
SortingAlgorithm="{Binding SortingAlgorithm}" />
<Label Grid.Row="1" Grid.Column="0" Text="Material Entry" />
<xfx:XfxEntry Grid.Row="1"
Grid.Column="1"
Placeholder="Enter your name"
Text="{Binding Name}"
ErrorText="{Binding NameErrorText}" />
<Label Grid.Row="2" Grid.Column="0" Text="No Error Message" />
<xfx:XfxEntry Grid.Row="2"
Grid.Column="1"
Placeholder="Enter your name (error message won't show)"
ErrorDisplay="None"
Text="{Binding Name}"
ErrorText="{Binding NameErrorText}" />
<Label Grid.Row="3" Grid.Column="0" Text="No Floating Label" />
<xfx:XfxEntry Grid.Row="3"
Grid.Column="1"
Placeholder="This hint won't float, and it's a password entry"
Text="{Binding Foo}"
ErrorText="{Binding FooErrorText}"
IsPassword="True"
FloatingHintEnabled="False" />
<Label Grid.Row="4" Grid.Column="0" Text="Change Colors" />
<xfx:XfxEntry Grid.Row="4"
Grid.Column="1"
Placeholder="Change Colors"
PlaceholderColor="DodgerBlue"
ActivePlaceholderColor="BlueViolet"
TextColor="Crimson"
Text="{Binding Foo}" />
<Label Grid.Row="5" Grid.Column="0" Text="Font Sizes" />
<xfx:XfxEntry Grid.Row="5"
Grid.Column="1"
FontSize="10"
Placeholder="Enter something "/>
</Grid>
</ContentPage>
And @LariscusObscurus 's solution cannot work in this case.
from xfx.controls.
Anyone is working on this ?
from xfx.controls.
I haven't fixed this yet, but I do have a question. Are you wrapping your layout in a ScrollView?
from xfx.controls.
from xfx.controls.
if it's not too much trouble, could you copy/paste your XAML?
from xfx.controls.
I'm able to reproduce this with your sample as well. Just replace this Control.xaml file will be enough to reproduce the issue and don't forgot to change extension from txt to xaml.
from xfx.controls.
I have same problem. When ComboBox is inside ContentPage.Content->ScrollView->StackLayout everything is ok. But when I put ComboBox inside ContentPage.Content->ScrollView->StackLayout->StackLayout or AbsoluteLayout I get same error. List of choices is over entry
from xfx.controls.
Related Issues (20)
- UWP Support HOT 1
- xfxEntry problem with Focus HOT 1
- Nuget update HOT 1
- Xfx Entry Readonly error
- Xfx ComboBox Gaps between list items
- Red Block appears behind CardView
- Completed event and ReturnCommand do not work
- How to make sorting algorithm async so it won't block the UI?
- Conflict with method PopToRoot of INavigation
- It doesn't seem the control works when in DataTemplate of repeating control. HOT 1
- xfx:entry ClearButtonVisibility
- problem with Combo : when typing digits HOT 2
- XfxCombobox =>suggestion not showing when user enter only single character HOT 3
- Show List When Xfx.Combobox clicked HOT 1
- XfxComboBox suggestion list not showing HOT 1
- xfxEntry problem with ReturnType HOT 27
- Build issue in Release mode (Linking SDK Assemblies) HOT 19
- XML documentation file missing from NuGet package
- On mainpage change I got error Object reference not set to an instance of an object HOT 11
- Maxlength is not working on XfxEntry HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xfx.controls.