【问题标题】:how can make this xaml design?这个xaml设计怎么做?
【发布时间】:2018-04-17 13:48:21
【问题描述】:
+------------------------------------+
|____________________________________|
|          |              |          |
|          |              |          |
.          .              .          .
.          .              .          .
.          .              .          .
.          .              .          .
.          .              .          .

下面的代码没有运行。我如何在 xamarin.forms 上的 xaml 中学习 ui 设计 .................................... ....................

     <Grid ColumnSpacing="0" RowSpacing="0" x:Name="GrdContainer">
    <Grid.RowDefinitions>
        <RowDefinition Height="1*" />
        <RowDefinition Height="9*" />      
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <Grid Grid.Column="0" HorizontalOptions="FillAndExpand" Grid.Row="0" Style="{StaticResource DashboardMenusHeadGridStyle}">
        <Label Text="başlık ... " TextColor="Black"></Label>
    </Grid>
    <Grid Column="0" Row="1" Style="{StaticResource DashboardMenusMyProfileGridStyle}">
       <Label Text="0,0" TextColor="Black" VerticalOptions="Center"></Label>
    </Grid> 
    <Grid Column="1" Row="1" Style="{StaticResource DashboardMenusWillGoEventsGridStyle}">
        <Label Text="1,0" TextColor="Black" VerticalOptions="Center"></Label>     
    </Grid>
    <Grid Column="2" Row="1" Style="{StaticResource DashboardMenusAllEventGridStyle}">
        <Label Text="2,0" TextColor="Black" VerticalOptions="Center"></Label>    
    </Grid>
</Grid>

【问题讨论】:

    标签: xaml xamarin xamarin.forms


    【解决方案1】:
    <Grid ColumnSpacing="0" RowSpacing="0" x:Name="GrdContainer">
      <Grid.RowDefinitions>
        <RowDefinition Height="1*" />
        <RowDefinition Height="9*" />      
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>
      <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Text="başlık ... " TextColor="Black"></Label>
      <Label Grid.Row="1" Grid.Column="0" Text="0,0" TextColor="Black" VerticalOptions="Center"></Label>
      <Label Grid.Row="1" Grid.Column="1" Text="1,0" TextColor="Black" VerticalOptions="Center"></Label>     
      <Label Grid.Row="1" Grid.Column="2" Text="2,0" TextColor="Black" VerticalOptions="Center"></Label>    
    </Grid>
    

    【讨论】:

      【解决方案2】:

      首先开始学习和实现所有布局,然后开始使用控件,它将帮助您设计一个好的 UI。堆栈布局和网格应该是您的首要任务https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/layouts/此链接包含所有内容。

      【讨论】:

        猜你喜欢
        • 2011-07-01
        • 1970-01-01
        • 2012-07-09
        • 1970-01-01
        • 2020-04-14
        • 1970-01-01
        • 2013-04-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多