This question is locked. New answers and comments are not allowed.
hi
i using RadDataBoundListBox in PanoramaItem.
It is normal view when design time, but item (HorizontalAlignment = Right) by runtime.
Only one page problem.
<!--ItemTemplate-->
<DataTemplate x:Key="RecentDataTemplate">
<Grid Background="Red">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.38*"/>
<ColumnDefinition Width="0.62*"/>
</Grid.ColumnDefinitions>
<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" />
</Grid>
</DataTemplate>
<!--PanoramaItem & RadDataBoundListBox-->
<controls:PanoramaItem Header="{Binding LocalizedResources.AppMain3SubLable, Source={StaticResource LocalizedStrings}}">
<telerikPrimitives:RadDataBoundListBox EmptyContent="최근 검색 내용이 없습니다." ItemTemplate="{StaticResource RecentDataTemplate}" ItemsSource="{Binding SearchDataCollection}">
</telerikPrimitives:RadDataBoundListBox>
</controls:PanoramaItem>
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">
<Setter.Value>
<ControlTemplate TargetType="telerikPrimitives:RadDataBoundListBoxItem">
<Border x:Name="LayoutRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver"/>
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TransparentBrush}"/>
</ObjectAnimationUsingKeyFrames>
<DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_ContainerHolder"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="SelectionStates">
<VisualState x:Name="Unselected"/>
<VisualState x:Name="Selected">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="PART_ContainerHolder">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneAccentBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<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}"/>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
i using RadDataBoundListBox in PanoramaItem.
It is normal view when design time, but item (HorizontalAlignment = Right) by runtime.
Only one page problem.
<!--ItemTemplate-->
<DataTemplate x:Key="RecentDataTemplate">
<Grid Background="Red">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.38*"/>
<ColumnDefinition Width="0.62*"/>
</Grid.ColumnDefinitions>
<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" />
</Grid>
</DataTemplate>
<!--PanoramaItem & RadDataBoundListBox-->
<controls:PanoramaItem Header="{Binding LocalizedResources.AppMain3SubLable, Source={StaticResource LocalizedStrings}}">
<telerikPrimitives:RadDataBoundListBox EmptyContent="최근 검색 내용이 없습니다." ItemTemplate="{StaticResource RecentDataTemplate}" ItemsSource="{Binding SearchDataCollection}">
</telerikPrimitives:RadDataBoundListBox>
</controls:PanoramaItem>
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">
<Setter.Value>
<ControlTemplate TargetType="telerikPrimitives:RadDataBoundListBoxItem">
<Border x:Name="LayoutRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver"/>
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TransparentBrush}"/>
</ObjectAnimationUsingKeyFrames>
<DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_ContainerHolder"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="SelectionStates">
<VisualState x:Name="Unselected"/>
<VisualState x:Name="Selected">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="PART_ContainerHolder">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneAccentBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<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}"/>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>