我刚开始使用xamarin,有一次被困住了。我想做一个像照片里那样的设计,我应该使用什么,我应该怎么做?
发布于 2022-08-08 11:20:26
<Switch x:Name="styleSwitch" />
<Label Text="Lorem ipsum dolor sit amet, elit rutrum, enim hendrerit augue vitae praesent sed non, lorem aenean quis praesent pede.">
<Label.Triggers>
<DataTrigger TargetType="Label"
Binding="{Binding Source={x:Reference styleSwitch}, Path=IsToggled}"
Value="true">
<Setter Property="FontAttributes"
Value="Italic, Bold" />
<Setter Property="FontSize"
Value="Large" />
</DataTrigger>
</Label.Triggers>
</Label>来自链接的参考。PLease看看这个。
发布于 2022-08-08 19:11:48
关于Jason的评论,请扩展如下:
<Grid RowDefinitions="50,50" ColumnDefinitions="200,200">
<Label Grid.Row="0" Grid.ColumnSpan="2" Text="Bildirimier" HorizontalTextAlignment="Center" />
<StackLayout Grid.Row="1" Grid.Column="0" Orientation="Horizontal">
<Label Text="Uygulama Bildirimiera" MaxLines="2" />
<Switch />
</StackLayout>
<StackLayout Grid.Row="1" Grid.Column="1" Orientation="Horizontal">
<Label Text="Mesajilara Izin Ver" MaxLines="2" />
<Switch />
</StackLayout>
</Grid>根据需要调整。查询"Grid“、"Label”、"StackLayout“、"Switch”以获取更多详细信息。
https://stackoverflow.com/questions/73276815
复制相似问题