2017-08-31 3 views
0

J'apprends toujours sur Xamarin. Je voudrais demander si je peux modifier la taille de la police en sortie de la chaîne dans mon fichier .resx. J'utilise VS 2015, Xamarin Shared. Voici quelques-uns de mes contenus dans mon fichier .resx.Comment modifier la taille des polices dans les valeurs .resx dans Xamarin?

<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> 

Répondre

0

Vous pouvez également stocker des numéros dans des fichiers de ressources.

<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> 

Ce code peut ne pas fonctionner à 100%. Mais devrait vous donner l'idée:

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);