Beispiel #1
0
        private static void OnDirectionChanged(FrameButton instance, FlexDirection direction)
        {
            switch (direction)
            {
            case FlexDirection.Row:
                AlignContent(instance, new Thickness(0, 0, 10, 0), LayoutOptions.StartAndExpand);
                break;

            case FlexDirection.RowReverse:
                AlignContent(instance, new Thickness(10, 0, 0, 0), LayoutOptions.StartAndExpand);
                break;

            case FlexDirection.Column:
                AlignContent(instance, new Thickness(0, 0, 0, 10), LayoutOptions.CenterAndExpand);
                break;

            case FlexDirection.ColumnReverse:
                AlignContent(instance, new Thickness(0, 10, 0, 0), LayoutOptions.CenterAndExpand);
                break;
            }
        }
Beispiel #2
0
 private static void AlignContent(FrameButton instance, Thickness margin, LayoutOptions layout)
 {
     instance.ButtonImage.Margin            = margin;
     instance.ButtonLabel.HorizontalOptions = layout;
 }