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

Jumplist elements not resizing as expected

5 Answers 45 Views
JumpList
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
George
Top achievements
Rank 1
George asked on 14 Apr 2011, 02:21 AM

I'm using the databound JumpList where a background worker thread gets info from a web service which might contain a comment field.  There is a textblock in the JumpList, comment, which has its visiblity set to collapsed when there isn't a comment and is visible when there is text.  It starts off without text and collaspsed however when a comment arrives, it doesn't resize and show the comment.

The Jump List and its datatemplate:

        <DataTemplate x:Key="DeviceDetailsTemplate">
            <Wp7Client_UserControls:Device DataContext="{Binding}"/>
        </DataTemplate
  
<telerikDataControls:RadJumpList x:Name="DevicesJumpList" ItemTemplate="{StaticResource DeviceDetailsTemplate}">
    <telerikDataControls:RadJumpList.GroupDescriptors>
       <telerikData:PropertyGroupDescriptor PropertyName="RoomName"/>
     </telerikDataControls:RadJumpList.GroupDescriptors>
 </telerikDataControls:RadJumpList>

And here is the Device that is referenced by the Data Template:

<UserControl x:Class="Wp7Client.UserControls.Device"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="160" d:DataContext="{d:DesignData /SampleData/DeviceSampleData.xaml}"
>
    <Border x:Name="LayoutRoot"  BorderBrush="Maroon" CornerRadius="4" BorderThickness="1">
        <StackPanel Margin="-1">
            <TextBlock Margin="0" Padding="0" Text="{Binding Name}" TextWrapping="Wrap" />
            <Border BorderBrush="{Binding StateIndicatorColor}" BorderThickness="2">
                <ProgressBar IsIndeterminate="{Binding IsBusy}" Height="4"/>
            </Border>
            <TextBlock x:Name="DeviceCategory" TextWrapping="Wrap" Text="{Binding CategoryName}"  />
        <Grid x:Name="DevicePanel" Visibility="Collapsed" Width="480" />
        <TextBlock x:Name="Comment" Visibility="{Binding CommentVisibility, Converter={StaticResource BooleanToVisiblityConverter}}"
            TextWrapping="Wrap" Text="{Binding Comment}" Foreground="#FF461B0D"/>
        </StackPanel>
    </Border>
</UserControl>

It is possible to have the elements in the JumpList resize when elements within a stackpanel have their visiblity changed from collapsed to visible?

TIA,
George

5 Answers, 1 is accepted

Sort by
0
Accepted
Deyan
Telerik team
answered on 14 Apr 2011, 08:40 AM
Hello George,

Thanks for contacting us and for the provided details.

I would like to kindly ask you to prepare a sample Windows Phone 7 application that demonstrates your scenario and send it to us so that we can directly take a look at it and see what goes wrong.

I would also like to note that using UserControl in DataTemplates for the visual items in the RadJumpList (and any other control that uses UI virtualization) is not recommended since the Silverlight framework parses the XAML for the UserControl each time a new instance of it is created (something tha happens many times when in  UI virtualization mode). In other words, the XAML string of UserControls is not cached. This my imply a significant performance hit on your application.

Please note that in order to be able to attach your demo project you should open a new support ticket.

Thanks for your time.

Regards,
Deyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
George
Top achievements
Rank 1
answered on 16 Apr 2011, 09:08 PM
Thank you Deyan, in fact the performance is abysmal and I was planning on addressing that issue next. So, I'll take your advice and get rid of the UserControl and replace it with XAML in the DataTemplate and take advantage of VIsualState to vary my UI. Perhaps this restructure will solve the problem I originally reported and if not, I'll package up a project as you requested and submit it.

Thanks again,
George
0
Deyan
Telerik team
answered on 18 Apr 2011, 09:03 AM
Hi George,

Thanks for getting back to us.

For now, we will consider this thread closed.

If you continue to experience the undesired behavior discussed below do not hesitate to get back to us. Please note that you will have to open a new support ticket in order to attach your demo application.

Thanks for your time.

All the best,
Deyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
George
Top achievements
Rank 1
answered on 04 May 2011, 04:39 PM
As suggested I removed the UserControl from the DataTempate and now it performs as expected.  

Also, the app spec has been changed and I no longer have to support dynamic visibility of TextBlocks. 

AND... as always, thanks for such great Telerik support!
0
Deyan
Telerik team
answered on 05 May 2011, 11:54 AM
Hi George,

Thanks for writing back and for the feedback.

We are happy to hear that you have managed to resolve your case.

You can get back to us anytime you need further assistance or have feedback to share.

Regards,
Deyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
JumpList
Asked by
George
Top achievements
Rank 1
Answers by
Deyan
Telerik team
George
Top achievements
Rank 1
Share this question
or