예제 #1
0
 void SetFabSize(FloatingActionButtonSize size)
 {
     if (size == FloatingActionButtonSize.Mini)
     {
         Element.WidthRequest  = FAB_MINI_FRAME_WIDTH_WITH_PADDING;
         Element.HeightRequest = FAB_MINI_FRAME_HEIGHT_WITH_PADDING;
     }
     else
     {
         Element.WidthRequest  = FAB_FRAME_WIDTH_WITH_PADDING;
         Element.HeightRequest = FAB_FRAME_HEIGHT_WITH_PADDING;
     }
 }
 void SetFabSize(FloatingActionButtonSize size)
 {
     if (size == FloatingActionButtonSize.Mini)
     {
         this.fab.Size              = FabSize.Mini;
         this.Element.WidthRequest  = FAB_MINI_FRAME_WIDTH_WITH_PADDING;
         this.Element.HeightRequest = FAB_MINI_FRAME_HEIGHT_WITH_PADDING;
     }
     else
     {
         this.fab.Size              = FabSize.Normal;
         this.Element.WidthRequest  = FAB_FRAME_WIDTH_WITH_PADDING;
         this.Element.HeightRequest = FAB_FRAME_HEIGHT_WITH_PADDING;
     }
 }
 private void SetFabSize(FloatingActionButtonSize size)
 {
     if (size == FloatingActionButtonSize.Mini)
     {
         ((FloatingActionButtonView)Element).WidthRequest  = FAB_MINI_FRAME_WIDTH_WITH_PADDING;
         ((FloatingActionButtonView)Element).HeightRequest = FAB_MINI_FRAME_HEIGHT_WITH_PADDING;
     }
     else if (size == FloatingActionButtonSize.NormalMini)
     {
         ((FloatingActionButtonView)Element).WidthRequest  = FAB_NORMAL_MINI_FRAME_HEIGHT_WITH_PADDING;
         ((FloatingActionButtonView)Element).HeightRequest = FAB_NORMAL_MINI_FRAME_HEIGHT_WITH_PADDING;
     }
     else
     {
         ((FloatingActionButtonView)Element).WidthRequest  = FAB_NORMAL_FRAME_WIDTH_WITH_PADDING;
         ((FloatingActionButtonView)Element).HeightRequest = FAB_NORMAL_FRAME_HEIGHT_WITH_PADDING;
     }
 }
예제 #4
0
 void SetFabSize(FloatingActionButtonSize size)
 {
     if (size is FloatingActionButtonSize.Mini)
     {
         _floatingActionButton.Size = (int)(Resources?.GetDimension(Resource.Dimension.fab_size_mini) ?? _miniHeight);
         Element.WidthRequest       = _miniFrameWidth;
         Element.HeightRequest      = _miniFrameHeight;
     }
     else if (size is FloatingActionButtonSize.Normal)
     {
         _floatingActionButton.Size = (int)(Resources?.GetDimension(Resource.Dimension.fab_size_normal) ?? _normalHeight);
         Element.WidthRequest       = _frameWidth;
         Element.HeightRequest      = _frameHeight;
     }
     else
     {
         throw new NotImplementedException();
     }
 }