简体   繁体   中英

How to load Image using Skiasharp in Tizen watch using C#

I'm using C# Xamarin, and SkiaSharp to render image from resource folder. But I cannot get the correct image location. 在此处输入图片说明

Where I can find this image when run project? I try to looking for but no result: 在此处输入图片说明

Thank you @Seungkenun Le. Base on his comment, I write a simple function to get resource path in Tizen Watch for Xamarin:

    /// <summary>
    /// Gets the resource path.
    /// </summary>
    /// <returns></returns>
    internal static string GetResourcePath()
    {
        Tizen.Applications.Application app = Tizen.Applications.Application.Current;
        if (app != null)
        {
            string resourcePath = app.DirectoryInfo.Resource;
            if (Directory.Exists(resourcePath))
            {
                return resourcePath;
            }
        }

        return string.Empty;
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM