Results 1 to 2 of 2

Thread: I need help

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2020
    Posts
    1

    I need help

    i need to do . a grid form in XAMARIN

    in vb.net
    i have problem with setting the rowdefinition and columdefinition.

    can some body show me a example of who can i do it?

    i do.
    function dashboard as Grid
    dim layouts = new New Grid

    AND now i have problem to define rowdefinicon

    dim texts = label
    texts = "my text"

    layouts.Children.Add(texts,1,0)

    return layouts
    end function

    WHAT I NEED TO DO IS.
    set row 1 and column 1
    SIZE and other parameter

    PLEASE HELP ..
    show me example i i do the rest

  2. #2
    Member
    Join Date
    Jan 2020
    Posts
    59

    Re: I need help

    Hii

    Try this...

    XAML :

    Code:
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="2*" />
        <RowDefinition Height="*" />
        <RowDefinition Height="200" />
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>
    </Grid>
    C# :

    Code:
    Grid grid = new Grid();
    grid.RowDefinitions.Add (new RowDefinition { Height = new GridLength(2, GridUnitType.Star) });
    grid.RowDefinitions.Add (new RowDefinition { Height = new GridLength (1, GridUnitType.Star) });
    grid.RowDefinitions.Add (new RowDefinition { Height = new GridLength(200)});
    grid.ColumnDefinitions.Add (new ColumnDefinition{ Width = new GridLength (200) });
    grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Auto) });
    Hope this can be helpful to you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width