2017-09-06 48 views
0

我使用的ImageCircle插件爲xamarin形式 它有效,有時,當圖片是一種方形... 但是,當它是一個矩形,我的圖像調整大小這不是我計劃的 我可以對圖像停止調整大小?我的ImageCircle調整自己的大小在xamarin.forms

我的代碼

 <controls:CircleImage WidthRequest="75" HeightRequest="75" Grid.Row ="0" Grid.Column="1" Source="cadastrarPhoto.png" x:Name="cadastrar_foto_perfil"> 

我seted修復的高度和寬度,你可以看到,但它並沒有解決我的問題,也許是因爲這個圈子像一個網格,其祖父的孩子(笑)是一個相對的佈局,但我真的不知道,如果WidthRequest能因爲這個改變......

它是如何始終應該是

enter image description here

它是如何當圖像是一個矩形:

enter image description here

編輯----------------------------- ---------------- 我把它放在一個施塔赫佈局和我定義的方面契合......它幫助但沒有解決......

<StackLayout Orientation="Horizontal" HorizontalOptions="Center" WidthRequest="75" HeightRequest="75" Grid.Row="0" Grid.Column="1"> 
     <controls:CircleImage Aspect="AspectFit" VerticalOptions="EndAndExpand" HorizontalOptions="EndAndExpand" Source="cadastrarPhoto.png" x:Name="cadastrar_foto_perfil"> 
     <controls:CircleImage.GestureRecognizers> 
      <TapGestureRecognizer Tapped="ChamaPickerImage"/> 
     </controls:CircleImage.GestureRecognizers> 
     </controls:CircleImage> 
    </StackLayout> 
+0

您是否嘗試將'Aspect =「AspectFit」'設置爲您的圖像控件? –

+0

是啊...我會在這裏發佈更多關於我的代碼的...因爲我更新了它 –

+0

對,我有...你能看到嗎? –

回答

0

我改變我正在使用的api。 現在我使用ffimage

相關問題