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

ListPicker Popup Window Background Error

1 Answer 42 Views
ListPicker
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Lucas
Top achievements
Rank 1
Lucas asked on 03 Jan 2013, 05:01 AM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Kiril Stanoev
Telerik team
answered on 03 Jan 2013, 09:11 AM
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.
Tags
ListPicker
Asked by
Lucas
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Share this question
or