Unhandled exception and application crash after update to 2012.2 607

3 posts, 1 answers
  1. OTMOP
    OTMOP avatar
    20 posts
    Member since:
    Jun 2012

    Posted 13 Jun 2012 Link to this post

    Hello.

    First of all sorry for my bad english.

    In my app I have a style for RadListPicker.

    <Style TargetType="telerikInput:RadListPicker">
            <Setter Property="PopupStyle">
                <Setter.Value>
                    <Style TargetType="telerikPrimitives:RadSelector">
                        <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
                        <Setter Property="Background" Value="{StaticResource ChromeBrush}"/>
                    </Style>
                </Setter.Value>
            </Setter>
            <Setter Property="HeaderStyle">
                <Setter.Value>
                    <Style TargetType="ContentControl">
                        <Setter Property="HorizontalAlignment" Value="Left" />
                        <Setter Property="VerticalAlignment" Value="Center" />
                        <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeNormal}" />
                        <Setter Property="Foreground" Value="{StaticResource LightAccentForegroundBrush}" />
                        <Setter Property="Margin" Value="0, 0, 0, 8" />
                    </Style>
                </Setter.Value>
            </Setter>
        </Style>

    All custom resources (brushes, colors, etc) are declared. This style worked perfect in 2012.1 321 version, but after update to 2012.2 607 my app is crashing in runtime with following exceptions:

    A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in System.Windows.dll
    A first chance exception of type 'System.Exception' occurred in System.Windows.dll
    A first chance exception of type 'MS.Internal.WrappedException' occurred in System.Windows.dll
    A first chance exception of type 'MS.Internal.WrappedException' occurred in System.Windows.dll
    A first chance exception of type 'MS.Internal.WrappedException' occurred in System.Windows.dll
    A first chance exception of type 'MS.Internal.WrappedException' occurred in System.Windows.dll


    It seems that problem is in PopupStyle declaration. If I remove it then application works well, but I need PopupStyle. Any ideas?
  2. Answer
    Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 13 Jun 2012 Link to this post

    Hello,

    We are aware of this change and it is documented as a breaking change in our release notes for Q2.2012.
    If you use custom style for the ListPicker PopupStyle you should change it to be similar to this:

    <Setter Property="PopupStyle">

    <Setter.Value>

    <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" />

    </Style>

    </Setter.Value>

    </Setter>

    </Style>

    </Setter.Value>

    </Setter>




    Greetings, Valentin.Stoychev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. OTMOP
    OTMOP avatar
    20 posts
    Member since:
    Jun 2012

    Posted 14 Jun 2012 Link to this post

    Thank you, Valentin. This solution works fine.
Back to Top