如何使用RelativePanel指定以下布局?

时间:2015-06-14 18:01:49

标签: xaml relativelayout

+--+---+--+
|  |RED|  |
+------+  |
| BLUE |  |
+------+--+

我尝试了RelativePanel.Align...附加属性的几种不同组合,但我似乎无法按照我想要的方式解决问题。

<!-- this version overlays Red beneath Blue, but aligned on the right -->
<Rectangle x:Name="Red" RelativePanel.AlignRightWith="Blue" />
<Rectangle x:Name="Blue" />

<!-- this version shoves Blue half off-screen -->
<Rectangle x:Name="Red" />
<Rectangle x:Name="Blue" RelativePanel.AlignRightWith="Red" RelativePanel.Below="Red" />

<!-- this version is a circular dependency -->
<Rectangle x:Name="Red" RelativePanel.AlignRightWith="Blue" />
<Rectangle x:Name="Blue" RelativePanel.Below="Red" />

1 个答案:

答案 0 :(得分:0)

如果我在你的鞋子里,我会使用if (f[0]=((lastLine!=null) // есть следующая строка || (f[1]=isEdgeTime) // конец сессии || (f[2]=td.getHour() <10) // или уже утро, после полуночи все свечки хороши || (f[3]=(td.getHour() == 23 && td.getMinute() >=50)) || (f[4]=currServerHour > lineHour) // или час сменился || (f[5]=currServerMinutesPeriod > linesMinutesPeriod) )){

Grid