2017-08-31 19 views
0

私はまだXamarinについて学んでいます。私はどのように私の.resxファイル内の文字列から出力されているフォントサイズを変更できるか尋ねたいと思います。私はVS 2015、Xamarin Sharedを使用しています。以下は私の.resxファイルの内容です。Xamarinで.resx値のフォントサイズを変更する方法は?

<data name="ERR_GENERAL_SERVER_ERROR_AUDIT" xml:space="preserve"> 
    <value>Ensure that the tablet is within WiFi coverage and try again. 

If within WiFi coverage please follow the below steps: 
    1. Force Close WISview 
     • WIS Issued Device: Click the circle at the bottom of the tablet and then click "Clear all processes" 
     • Non WIS Issued Device: Click the square at the bottom of the device and then clicking the X on the WISview tile 
    2. Re-open WISview and select “no” to the screen that prompts you to “use this inventory” 
    3. Re-print a new Inventory Control barcode from the Laptop 
    4. Scan the newly printed Inventory Control Barcode. 

If still unable to begin audit of tag {0}, please contact helpline.</value> 
    <comment>Error</comment> 
    </data> 

答えて

0

また、リソースファイルに数値を格納することもできます。

<data name="NotesLabel" xml:space="preserve"> 
    <value>Notes:</value> 
    <comment>label for input field</comment> 
</data> 

<data name="NotesLabelFontSize" xml:space="preserve"> 
    <value>15</value> 
</data> 

このコードは100%実行されていない可能性があります。しかし、あなたに考えを与える必要があります:

enter code here 
var myLabel = new Label(); 

// populate UI with translated text values from resources 
myLabel.Text = AppResources.NotesLabel; 
myLabel.FontSize = Convert.ToInt64(AppResources.NotesLabelFontSize); 
関連する問題