行に十分な空き容量がないサブ要素の新しい行に自動的に折り返すXAML要素はありますか?私は何を意味レスポンシブなWindowsアプリケーション要素
は、ワイド画面に私が買ってあげることです。
Box1 Box2 Box3
と狭い1上:
Box1 Box2
Box3
なしイベントに耳を傾け、でそれを修正する必要がコード。
コメントはVariableSizedWrapGrid
を解決策として言及しています。しかし、私はそれを包み込む方法を理解できません。
行に十分な空き容量がないサブ要素の新しい行に自動的に折り返すXAML要素はありますか?私は何を意味レスポンシブなWindowsアプリケーション要素
は、ワイド画面に私が買ってあげることです。
Box1 Box2 Box3
と狭い1上:
Box1 Box2
Box3
なしイベントに耳を傾け、でそれを修正する必要がコード。
コメントはVariableSizedWrapGrid
を解決策として言及しています。しかし、私はそれを包み込む方法を理解できません。
単純なGridViewを使用すると、それを行うことができます。 高さをに設定しないと、チャームのように機能します。
<GridView Name="xConcerts" ItemsSource="{x:Bind Artist.UpcomingEvents, Mode=OneWay}">
<GridView.ItemTemplate>
<DataTemplate x:DataType="songkick:EventExt">
<Border CornerRadius="8" Background="{ThemeResource ThemeGrayHighColorBrush}" Opacity="0.8">
<StackPanel Margin="18,2">
<TextBlock Text="{x:Bind FullDisplayDate, Converter={StaticResource FormatStringToDateDayConverter}}" Style="{ThemeResource ThemeDateBoldStyle}"/>
<TextBlock Text="{x:Bind FullDisplayDate, Converter={StaticResource FormatStringToDateMonthConverter}}" Style="{ThemeResource ThemeDateBoldStyle}" Margin="0,-4,0,0"/>
</StackPanel>
</Border>
</DataTemplate>
</GridView.ItemTemplate>
<GridView.ItemContainerTransitions>
<TransitionCollection>
<RepositionThemeTransition/>
</TransitionCollection>
</GridView.ItemContainerTransitions>
</GridView>
あなたの条件によると、WinRTXamlToolkitにWrapPanelコントロールを使用すると、あなたのニーズを満たします。ここで
サンプルコード:ここで
<Page x:Class="TestDemo.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Tool="using:WinRTXamlToolkit.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:TestDemo"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Tool:WrapPanel>
<Button Width="200" Margin="10">1</Button>
<Button Width="200" Margin="10">2</Button>
<Button Width="200" Margin="10">3</Button>
</Tool:WrapPanel>
</Page>
と出力:
はhttps://msdn.microsoft.com/library/windows/apps/xaml([VariableSizedWrapGrid]のように聞こえます/windows.ui.xaml.controls.variablesizedwrapgrid.aspx)? –
http://stackoverflow.com/questions/2599424/what-is-the-wpf-equivilant-for-the-flowlayoutpanel – Gusman
@Gusman ya WrapPanelはUWPにありません –