를 형성 나는 다음과 같은 코드가 있습니다스택 레이아웃 레이아웃 악몽
<StackLayout Orientation="Horizontal" HorizontalOptions="FillAndExpand" Margin="0,10,0,10" BackgroundColor="Green" Padding="5,5,5,5">
<StackLayout Orientation="Vertical" HorizontalOptions="FillAndExpand" Margin="0,0,0,0" BackgroundColor="Blue">
<Label Text="SHOW COMPLETED TASKS" BackgroundColor="Red" Style="{StaticResource lblSubHeading_Black}" />
</StackLayout>
<Switch x:Name="CompletedJobsSwitch" Toggled="CompletedJobsSwitch_Toggled" HorizontalOptions="EndAndExpand" IsToggled="{Binding isOn}" BackgroundColor="Yellow"/>
</StackLayout>
응용 프로그램로드가 표시 될 때 모든 부하를 잘하지만,하지만 스위치를 잘 세척되지 않습니다. 왜? 정말 짜증나, 정말 일관성이없는 것 같습니다 나는 http://forums.xamarin.com/discussion/21226/how-to-right-align-a-view-inside-a-list-item을 보았습니다. 그러나 이것은 저에게는 효과적이지 않습니다.
아이디어가 있으십니까?
일관성이 없습니다. 'StackLayout'은 필요한만큼의 공간 만 차지합니다. 가장 높은 레벨에서 그것 주위에'Grid'를 놓으십시오. –
내가 inconstant라고 할 때, Xamar 양식에 XAML을 사용하지만, Stackable을 StackLayout으로 채우고 확장하면 왜 그 일을하지 않습니까? 그리드를 추가하면이 문제에 대해 석고가 붙어있는 것처럼 보입니다. –
그리드를 추가 할 필요없이 최상위 StackLayout을 Grid로 바꿉니다. –