내 xaml 코드에서 2x2의 사각형을 만들고 싶습니다. 이 같은 (I 윈도우 전화 레이아웃에서 파노라마 컨트롤을 사용) ..윈도우 폰 레이아웃에 대한 질문이 있습니다
O의 O
O의 O
은이 코드를 사용합니다.
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel FlowDirection="LeftToRight" Orientation="Horizontal" Margin="0,0,0,17">
<!--Replace rectangle with image-->
<Rectangle Height="100" Width="100" Fill="Orange" Margin="12,0,9,0"/>
<StackPanel Width="311">
<TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
<TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</controls:PanoramaItem>
하지만 그 수
...
O
O
O
O
이 문제를 어떻게 해결할 수 있습니까? 알려주세요. 부디! 고맙습니다. :)
정확하게 이해했다면 항목을 "직사각형"으로 배치해야합니까? 그래서, WrapPanel을 사용해보십시오. http://windowsphonegeek.com/articles/WP7-WrapPanel-in-depth –