ListPicker Popup Window Background Error

2 posts, 1 answers
  1. Lucas
    Lucas avatar
    3 posts
    Member since:
    Jul 2012

    Posted 02 Jan 2013 Link to this post

    Hi, based off of a thread posted about changing the background of the popup window i took the code to create a white background, but i get an error that allows me to build but calls an unhandled exception when running. Below is my code.

    <Telerik:RadListPicker x:Name="CategoryList" VerticalAlignment="Top" PopupHeader="CATEGORIES" Header="Category" Grid.Row="1" PopupItemTemplate="{StaticResource CategoryPopUpItemTemplate}">
       <Telerik:RadListPicker.PopupStyle>
          <Style TargetType="TelerikPrimitives:RadSelector">
             <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeExtraLarge}"/>
             <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiLight}"/>
             <Setter Property="Background" Value="White"/>
             <Setter Property="HorizontalAlignment" Value="Stretch"/>
             <Setter Property="VerticalAlignment" Value="Stretch"/>
          </Style>
       </Telerik:RadListPicker.PopupStyle>
    </Telerik:RadListPicker>

    Below is there i get when highlighting over my XAML

    'Error HRESULT E_FAIL has been returned from a call to a COM component'

    Any suggestions? Thank you
  2. Answer
    Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 03 Jan 2013 Link to this post

    Hi Lucas,

    Recently we introduced a change in RadListPicker where we incorporated the RadDataBoundListBox control in its control template. Therefore, your code snippet should become something like this:

     

    <Telerik:RadListPicker x:Name="CategoryList" VerticalAlignment="Top" PopupHeader="CATEGORIES" Header="Category" Grid.Row="1" PopupItemTemplate="{StaticResource CategoryPopUpItemTemplate}">
        <Telerik:RadListPicker.PopupStyle>
            <Style TargetType="TelerikPrimitives:RadDataBoundListBox">
                <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeExtraLarge}" />
                <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiLight}" />
                <Setter Property="Background" Value="{StaticResource PhoneChromeBrush}" />
                <Setter Property="HorizontalAlignment" Value="Stretch" />
                <Setter Property="VerticalAlignment" Value="Stretch" />
                <Setter Property="CheckBoxStyle">
                    <Setter.Value>
                        <Style TargetType="telerikPrimitives:ItemCheckBox">
                            <Setter Property="VerticalAlignment" Value="Center" />
                            <Setter Property="Margin" Value="0, 0, -18, 0"/>
                        </Style>
                    </Setter.Value>
                </Setter>
            </Style>
       </Telerik:RadListPicker.PopupStyle>
    </Telerik:RadListPicker>


    Give it a try and let me know how it goes.

    Kind regards,
    Kiril Stanoev
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
Back to Top