No Items displayed with custom style

2 posts, 0 answers
  1. Michael Keiser
    Michael Keiser avatar
    3 posts
    Member since:
    Nov 2009

    Posted 09 Sep 2013 Link to this post

    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

  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 12 Sep 2013 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top