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

No Items displayed with custom style

1 Answer 69 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Roman
Top achievements
Rank 1
Roman asked on 09 Sep 2013, 07:52 AM
Hi
I was trying to set margin of RadAutoCompleteBox by override the default style of the control. If I'm doing it this way, the margin works as well. But if I'm searching for some items, no entries are shown. If I'm setting margin explicite on the control it self it works perfectly.
Do you know how to prevent this issue?

Here my Style:
 
<Style x:Key="RadAutoCompleteBoxStyle" TargetType="{x:Type telerik:RadAutoCompleteBox}"><br>        <Setter Property="IsTabStop" Value="True"/><br>        <Setter Property="TextBoxStyle"><br>            <Setter.Value><br>               ....<br>            </Setter.Value><br>        </Setter><br>        <Setter Property="BorderBrush" Value="#FF848484"/><br>        <Setter Property="BorderThickness" Value="1"/><br>        <Setter Property="Background" Value="White"/><br>        <Setter Property="Padding" Value="0,0,3,3"/><br>        <Setter Property="Cursor" Value="IBeam"/><br>        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/><br>        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/><br>        <Setter Property="SnapsToDevicePixels" Value="True"/><br>        <b><Setter Property="Margin" Value="5,2"/></b><br>    </Style>


And here the Control:
<telerik:RadAutoCompleteBox Grid.Row="0" Grid.Column="1"
                                    SelectionMode="Single"
                                    ItemsSource="{Binding LandItems}"
                                    SelectedItem="{Binding SelectedLand}"
                                    DisplayMemberPath="LanISOCodeBezeichnungConcat" TextSearchMode="Contains"
                                    Style="{DynamicResource RadAutoCompleteBoxStyle}"/>

The Issue looks like this:


That's how it should look like:


Thanks for your help


Michael

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 12 Sep 2013, 07:03 AM
Hi Michael,

I am copying the reply from the support ticket:

We tried to reproduce the explained behavior but no avail. I've attached here our sample test project, could you please try to modify it in order to recreate your scenario and send it back to us?



Regards,
Yana
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
AutoCompleteBox
Asked by
Roman
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or