我正在使用Telerik RadAutoComplete框,每当我搜索任何值时,显示的下拉列表都是透明的。我能够看到背景形式以及搜索值的名称,这是错误的。以下是客户端代码
<telerik:RadAutoCompleteBox RenderMode="Lightweight" ID="txtInstitutionName" runat="server" EmptyMessage="Select School"
DropDownWidth="200px" AllowCustomEntry="true" TextSettings-SelectionMode="Single" InputType="Text"
Filter="Contains" Delimiter=" ">
</telerik:RadAutoCompleteBox>
下面是有缺陷的RadAutoCompleteBox的图片。
请建议。
答案 0 :(得分:0)
这里的问题相同。 Telerik版本2017.1
此样式是一种解决方法:
Digits *digits = [Digits sharedInstance];
DGTAuthenticationConfiguration *configuration = [[DGTAuthenticationConfiguration alloc] initWithAccountFields:DGTAccountFieldsDefaultOptionMask];
configuration.phoneNumber = completePhoneNumber;
[digits authenticateWithViewController:nil configuration:configuration completion:^(DGTSession *newSession, NSError *error){
if (newSession.userID) {
// TODO: associate the session userID with your user model
NSString *msg = [NSString stringWithFormat:@"Phone number: %@", newSession.phoneNumber];
NSLog(@"Phone number message %@",msg);
UIStoryboard *storyboard1=[UIStoryboard storyboardWithName:@"Main" bundle:nil];
Hello *welcom=[storyboard1 instantiateViewControllerWithIdentifier:@"hello"];
[self.navigationController pushViewController:welcom animated:YES];
} else if (error) {
NSLog(@"Authentication error: %@", error.localizedDescription);
}
}];
答案 1 :(得分:0)
将PopUp Grid的背景颜色设置为白色。
<Grid x:Name="PopupRoot" Background="White">
完整的风格:
<Style x:Key="RadAutoCompleteBoxControlWithBackground" TargetType="{x:Type telerik:RadAutoCompleteBox}" BasedOn="{StaticResource ResourceKey={x:Type telerik:RadAutoCompleteBox}}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:RadAutoCompleteBox}">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Duration="0" To="0.6" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Unfocused"/>
<VisualState x:Name="Focused">
<Storyboard>
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisual"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" />
<Border x:Name="MouseOverVisual" BorderBrush="Gray" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" Opacity="0"/>
<Border x:Name="FocusVisual" BorderBrush="Gray" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1" IsHitTestVisible="False" Opacity="0">
<Border BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0"/>
</Border>
<Border x:Name="DisabledVisualElement" BorderBrush="#FF9BB0CD" BorderThickness="{TemplateBinding BorderThickness}" Background="#FFE2F0FD" CornerRadius="1" IsHitTestVisible="False" Opacity="0"/>
<ScrollViewer x:Name="PART_ScrollViewer" BorderThickness="0" Height="{TemplateBinding Height}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsTabStop="False" Margin="{TemplateBinding BorderThickness}" Padding="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
<telerik:AutoCompleteBoxesItemsControl x:Name="PART_Boxes" BoxesItemTemplateSelector="{TemplateBinding BoxesItemTemplateSelector}" BoxesItemStyleSelector="{TemplateBinding BoxesItemStyleSelector}" BoxesItemTemplate="{TemplateBinding BoxesItemTemplate}" BoxesItemStyle="{TemplateBinding BoxesItemStyle}" DisplayMemberPath="{TemplateBinding DisplayMemberPath}" Foreground="{TemplateBinding Foreground}" IsTabStop="False" Margin="{TemplateBinding Padding}">
<telerik:AutoCompleteBoxesItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<telerik:AutoCompleteBoxesWrapPanel IsItemsHost="True"/>
</ItemsPanelTemplate>
</telerik:AutoCompleteBoxesItemsControl.ItemsPanel>
</telerik:AutoCompleteBoxesItemsControl>
</ScrollViewer>
<Popup x:Name="PART_Popup">
<Grid x:Name="PopupRoot" Background="White">
<telerik:RadListBox x:Name="PART_ListBox" IsTabStop="False" ItemsSource="{TemplateBinding FilteredItems}" ItemTemplate="{TemplateBinding DropDownItemTemplate}" IsTextSearchEnabled="True" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding MinDropDownWidth}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" SelectedValueBinding="{x:Null}" TextBinding="{x:Null}">
</telerik:RadListBox>
</Grid>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>