English 中文(简体)
视窗电话 生活方式使名单Box成为残疾人的虚拟化。 如何恢复虚拟?
原标题:Windows Phone Style make ListBox s Virtualizing disabled . how to recover Virtualizing?

我们知道,名单Box的纸浆厂正在虚拟化。 我对我的清单Box作了定义。 清单Box虚拟化可能起作用。 我能做些什么?

<Style x:Key="ListBoxStyle" TargetType="ListBox">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBox">
                    <ScrollViewer x:Name="ScrollViewer" 
                                  BorderBrush="{TemplateBinding BorderBrush}" 
                                  BorderThickness="{TemplateBinding BorderThickness}" 
                                  Background="{TemplateBinding Background}" 
                                  Foreground="{TemplateBinding Foreground}" 
                                  Padding="{TemplateBinding Padding}">
                        <StackPanel>
                            <ItemsPresenter/>
                            <HyperlinkButton Content="Add More"
                                             FontSize="25"
                                             Grid.Row="1"
                                             Name="hybtnAddMerchant"
                                             Click="hybtnAddMerchant_Click"
                                             VerticalAlignment="Bottom"/>
                        </StackPanel>
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
问题回答

• 努力改变管制制度:

<ControlTemplate TargetType="ListBox"> 
  <Grid>
     <Grid.RowDefinitions>
        <RowDefinition />
        <RowDefinition Height="Auto"/>
     </Grid.RowDefinitions>
     <ScrollViewer x:Name="ScrollViewer" Grid.Row="0"
                   BorderBrush="{TemplateBinding BorderBrush}"  
                   BorderThickness="{TemplateBinding BorderThickness}"  
                   Background="{TemplateBinding Background}"  
                   Foreground="{TemplateBinding Foreground}"  
                   Padding="{TemplateBinding Padding}"> 
           <ItemsPresenter/> 
      </ScrollViewer> 
      <HyperlinkButton Content="Add More" FontSize="25" 
             Grid.Row="1" Name="hybtnAddMerchant" Click="hybtnAddMerchant_Click" VerticalAlignment="Bottom"/> 
  </Grid>
</ControlTemplate> 

在您的“控制领域”中,将“<条码>和>;StackPanel>改为“条码>和代号”;VirtualizingStackPanel>,应当这样做。





相关问题
System.Json namespace missing from Windows Phone 7

During a Mix10 presentation, the presenter (Charlie Kindel) said that when writing Silverlight based apps for WP7 you get all of Silverlight 3.0 with some of Silverlight 4.0 mixed in. Why then is ...

Will Windows Phone 7 Support Multitasking third party apps

Obviously it s early days, I do not know whether this is information that is in the public domain or not yet, but... I have trawled through some of this site - http://www.windowsphone7series.com/ but ...

Windows Series Phone 7 "Cloud"

I have been reading up on "Cloud computing" on here and still not getting it. Basically I want to develop for the WP7 http://msdn.microsoft.com/en-us/library/ff402531%28v=VS.92%29.aspx#...

Windows Phone 7 Tab Pages (page cycle)

I know.. I know, it s only a few hours old. But how the hell do you get the little page tabbing/cycle (forgot what the official name is) on the top of the page under the app title. MIX Keynotes made ...

Recording audio from the microphone in Windows Phone 7 Series

I m wondering if anyone has any code samples or links to documentation that demonstrate how to capture audio from the device s microphone on the new Windows Phone Series 7. I ve recently downloaded ...

Resources for Windows Phone 7 development [closed]

Windows Phone 7 has been unveiled and MS have announced all details of the development chain at the Mix10 conference. So this could be a good starting point/collection of online resources as they ...

热门标签