Class NUIGadgetResourceManager

    Definition

    Namespace:
    Tizen.NUI
    Assembly:
    Tizen.NUI.Gadget.dll

    Manages resources related to NUI gadgets.

    public class NUIGadgetResourceManager
    Inheritance
    object
    NUIGadgetResourceManager

    Constructors

    View Source

    NUIGadgetResourceManager(string, string, string)

    Initializes the resource manager of the gadget.

    Declaration
    public NUIGadgetResourceManager(string resourcePath, string resourceDll, string resourceClassName)
    Parameters
    Type Name Description
    string resourcePath

    The path where the resources are located.

    string resourceDll

    The name of the DLL containing the resources.

    string resourceClassName

    The name of the class that represents the resources.

    View Source

    NUIGadgetResourceManager(NUIGadgetInfo)

    Initializes the resource manager of the gadget.

    Declaration
    public NUIGadgetResourceManager(NUIGadgetInfo info)
    Parameters
    Type Name Description
    NUIGadgetInfo info

    The information of the gadget.

    Methods

    View Source

    GetString(string, CultureInfo)

    Retrieves the localized string resource for the specified culture.

    Declaration
    public string GetString(string name, CultureInfo cultureInfo)
    Parameters
    Type Name Description
    string name

    The name of the resource to fetch.

    CultureInfo cultureInfo

    An object representing the culture for which the resource needs to be localized.

    Returns
    Type Description
    string

    The localized string resource for the specified culture, or null if the resource cannot be found.

    Remarks

    This method enables you to obtain a localized version of a specific string resource based on the provided culture. It returns the desired resource value or null if the requested resource cannot be found in the resource set.

    View Source

    GetString(string)

    Retrieves the value of the specified string resource.

    Declaration
    public string GetString(string name)
    Parameters
    Type Name Description
    string name

    The unique identifier for the string resource to retrieve.

    Returns
    Type Description
    string

    The value of the requested string resource, or null if no matching resource could be found.

    Remarks

    This function allows you to access localized string resources by providing their names. It returns the actual value of the requested resource, which can then be displayed to users or used elsewhere in your application logic. If the specified resource does not exist or cannot be found, the function will return null instead.

    Examples

    Here's an example demonstrating how to retrieve a string resource named "greeting" from the current context:

    // Retrieve the greeting message
    string greetingMessage = GetString("greeting");
    
    // Display the greeting message to the user
    Console.WriteLine(greetingMessage);

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX