This is a migrated thread and some comments may be shown as answers.
ItemTemplate problem
3 Answers 39 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Top achievements
Rank 1
Park asked on 31 Jan 2012, 06:19 AM

i using RadDataBoundListBox in PanoramaItem.

It is normal view when design time, but item (HorizontalAlignment = Right) by runtime.
Only one page problem.

 <DataTemplate x:Key="RecentDataTemplate">
  <Grid Background="Red">
    <ColumnDefinition Width="0.38*"/>
    <ColumnDefinition Width="0.62*"/>
   <TextBlock Text="{Binding SearchKind, Converter={StaticResource SearchKindToTextConverter}}" Style="{StaticResource SingleLineSmallTextBlockStyle}" Margin="12,0,27,12" />
   <TextBlock TextWrapping="Wrap" Text="{Binding SearchData}" Style="{StaticResource SingleLineTextBlockStyle}" Grid.Column="1" Margin="12,0,27,12" />

   <!--PanoramaItem & RadDataBoundListBox-->
   <controls:PanoramaItem Header="{Binding LocalizedResources.AppMain3SubLable, Source={StaticResource LocalizedStrings}}">
    <telerikPrimitives:RadDataBoundListBox EmptyContent="최근 검색 내용이 없습니다." ItemTemplate="{StaticResource RecentDataTemplate}" ItemsSource="{Binding SearchDataCollection}">

How can i do?
thank you

this problem solve

it is maybe ItemContainer problem(why different design-time and run-time container?)
i add ItemContainerStyle.

 <!--데이터바운드리스트박스 아이템 컨테이너 스타일1, 줄간 간격 많이 띄움-->
    <Style x:Key="TouchItemContainerStyle1" TargetType="telerikPrimitives:RadDataBoundListBoxItem">
     <Setter Property="Background" Value="Transparent"/>
     <Setter Property="BorderThickness" Value="0"/>
     <Setter Property="BorderBrush" Value="Transparent"/>
     <Setter Property="Padding" Value="0"/>
     <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
     <Setter Property="VerticalContentAlignment" Value="Stretch"/>
     <Setter Property="CacheMode" Value="BitmapCache"/>
     <Setter Property="Template">
       <ControlTemplate TargetType="telerikPrimitives:RadDataBoundListBoxItem">
        <Border x:Name="LayoutRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
          <VisualStateGroup x:Name="CommonStates">
           <VisualState x:Name="Normal"/>
           <VisualState x:Name="MouseOver"/>
           <VisualState x:Name="Disabled">
             <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
              <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TransparentBrush}"/>
             <DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_ContainerHolder"/>
          <VisualStateGroup x:Name="SelectionStates">
           <VisualState x:Name="Unselected"/>
           <VisualState x:Name="Selected">
             <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="PART_ContainerHolder">
              <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneAccentBrush}"/>
         <Grid Margin="12,0,12,25" HorizontalAlignment="Left">
          <ContentControl x:Name="PART_ContainerHolder" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Right" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>

3 Answers, 1 is accepted

Sort by
Telerik team
answered on 31 Jan 2012, 04:44 PM
Hi Park,

I am not quite sure that I correctly understand the issue here.

Is your problem related to the fact that you see different layout while in runtime compared to what's on the screen in the designer? I yes, are there any additional styling adjustments that you perform in the code of your application when it runs?

It will be very helpful if you manage to attach a demo project that we can use to take a look at the issue.

Thanks for your time.

the Telerik team

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

Top achievements
Rank 1
answered on 04 Feb 2012, 04:02 PM
hi Deyan

yes it is issue in control
many problem design-time and run-time  different view

but, i solve this problem now. (how can i do it -> Is on the tip of my )
if you want source, can send email.

Currently the 'Korea Bus Infomation 2.0' app is under development.
sent to the source can give Telerik

have a good day
Telerik team
answered on 06 Feb 2012, 10:01 AM
Hello Park,

For now, we will consider this thread close.

Do not hesitate to get back to us in case you experience further difficulties or need assistance.

the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Top achievements
Rank 1
Share this question