Class UIGadgetResourceManager

    Definition

    Namespace:
    Tizen.Applications
    Assembly:
    Tizen.Applications.UIGadget.dll

    Manages resources related to NUI UIGadgets.

    public class UIGadgetResourceManager
    Inheritance
    object
    UIGadgetResourceManager

    Constructors

    View Source

    UIGadgetResourceManager(string, string, string)

    Initializes the resource manager of the UIGadget.

    Declaration
    public UIGadgetResourceManager(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

    UIGadgetResourceManager(UIGadgetInfo)

    Initializes the resource manager of the UIGadget.

    Declaration
    public UIGadgetResourceManager(UIGadgetInfo info)
    Parameters
    Type Name Description
    UIGadgetInfo info

    The information of the UIGadget.

    Methods

    View Source

    GetResourceManager()

    Retrieves the resource manager for the current UI culture.

    Declaration
    public System.Resources.ResourceManager GetResourceManager()
    Returns
    Type Description
    System.Resources.ResourceManager

    The resource manager for the current UI culture, or null if no matching resource manager could be found.

    View Source

    GetResourceManager(CultureInfo)

    Retrieves the resource manager for the specified culture.

    Declaration
    public System.Resources.ResourceManager GetResourceManager(CultureInfo cultureInfo)
    Parameters
    Type Name Description
    CultureInfo cultureInfo

    The culture information for which the resource manager is requested.

    Returns
    Type Description
    System.Resources.ResourceManager

    The resource manager for the specified culture, or null if no matching resource manager could be found.

    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