2017-12-02 2 views

答えて

2

このトピックをカバーする素晴らしい記事hereがあります。それは多くの例を含んでいます。

<Label x:Name="lblName" Text="{local:TranslateExtension MyString}" /> 
:あなたはあなたのコードは次のようになりますあなたのTranslateExtensionを実装した後

2

あなたApp.axmlファイル:

<Application xmlns="http://xamarin.com/schemas/2014/forms" 
      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
      x:Class="Master.App"> 
    <Application.Resources> 
     <!-- Application resource dictionary --> 
     <ResourceDictionary> 
      <x:String x:Key="AppName">Name of app</x:String> 
     </ResourceDictionary> 
    </Application.Resources> 
</Application> 

そして、あなたのラベル:

<Label Text="{StaticResource AppName}"/> 
関連する問題