Beispiel #1
0
        /// <summary>
        /// Navigate to specified Url
        /// </summary>
        /// <param name="path">The path.</param>
        /// <param name="hypertext">protocol: http or https</param>
        public void Navigate(string path, string hypertext = "https")
        {
            if (string.IsNullOrEmpty(path))
            {
                throw new ArgumentNullException("path");
            }

            string url = path;

            if (!path.StartsWith("http", StringComparison.OrdinalIgnoreCase) ||
                !path.StartsWith("https", StringComparison.OrdinalIgnoreCase))
            {
                _siteMapData.SelectPage(path, hypertext);
                url = _siteMapData.DeviceUrl.AbsoluteUri;
            }

            _client.Open(new Uri(url));
        }