1
我有一個ListView一個問題,我不知道如何解決它沒有硬編碼的寬度上的Windows Phone 8.1應用右列:的ListView與
我有這樣的ListView:
<ListView
Name="lstStates"
CommonNavigationTransitionInfo.IsStaggerElement="True"
ContinuumNavigationTransitionInfo.ExitElementContainer="True"
IsItemClickEnabled="True"
ItemClick="lstStates_ItemClick"
ItemsSource="{Binding States}"
HorizontalAlignment="Stretch"
>
<ListView.ItemTemplate>
<DataTemplate>
<Grid Margin="8" Background="AliceBlue" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<TextBlock
CommonNavigationTransitionInfo.IsStaggerElement="True"
Style="{ThemeResource ListViewItemTextBlockStyle}"
Text="{Binding State, FallbackValue=State}"/>
<TextBlock
Grid.Column="1"
Style="{ThemeResource ListViewItemTextBlockStyle}"
Text="{Binding Count, FallbackValue=1}"/>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
正如你所看到的,基本上是如何計數在右邊(文本塊綁定與計數)。問題是每個網格只使用它需要的寬度而不是整個空間
想法??
感謝
它的工作!!!!謝謝! :) –
哈好消息:) – Depechie