2016-07-22 10 views
0

Xamarin.Formsプロジェクトで作業しており、Windows Phoneでの画像のスケーリングに問題があります。 Windows and AndroidXamarinフォームを使用したWindows Phoneの画像スケーリング

グリッドを使用してすべてのアイコンを表示しています。ここでは、1つの画像ボタンに使用したコードを示します。

<Button Image="cam.png" 
     VerticalOptions="Center" 
     Grid.Row="0" Grid.Column="0" 
     BorderColor="Transparent" 
     BackgroundColor="Transparent" 
     Clicked="OnTrafficClicked"/> 

私はこれについて夫婦同様の記事を見つけたが、私は、複数の画像があるとき、私はプラットフォームでのスケーリングを実装する方法を理解していません。

私はこれを試してみましたが、プログラム

<Image.Scale> 
    <OnPlatform x:TypeArguments="Scale" 
       WinPhone="1.5" /> 
</Image.Scale> 

https://forums.xamarin.com/discussion/19525/image-source-with-onplatform-in-xaml

+0

https://forums.xamarin.com/discussion/47947/differences-with-scaling-between-the-platforms – Jason

答えて

0

を実行することができません、私はそれを把握することができた、誰もがこの同じ問題を持っている場合には、これは私がやったことです:

<ContentPage.Resources> 
    <ResourceDictionary> 
     <OnPlatform x:Key="stdScaling" x:TypeArguments="x:Double" 
     iOS="1.0" 
     Android="1.0" 
     WinPhone="2.5" /> 
    </ResourceDictionary> 
</ContentPage.Resources> 

は、ボタンのために、私は

Scale= "{StaticResource stdScaling}" 
を置く
関連する問題