Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="eventArgs"></param>
        private void ProcessWebViewHeaderChanged(WebViewHeaderChangedEventArgs eventArgs)
        {
            Guid browserId = eventArgs.BrowserId;

            TabUiItem tabUiItem = this.CurrentTabUiItems.FirstOrDefault(x => x.Content.GetType() == typeof(Browser) && (x.Content as Browser).ViewModel.GetId().Equals(browserId));

            if (tabUiItem != null)
            {
                string documentTitle = eventArgs.DocumentTitle;
                tabUiItem.DocumentTitle = documentTitle;

                string documentIcon = eventArgs.DocumentIcon;
                if (documentIcon == null)
                {
                    tabUiItem.DocumentIcon = null;
                }
                else
                {
                    tabUiItem.DocumentIcon = new BitmapIconSource {
                        UriSource = new Uri(documentIcon), ShowAsMonochrome = false
                    };
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="source"></param>
 /// <param name="e"></param>
 private void ViewModel_OnWebViewHeaderChanged(object source, WebViewHeaderChangedEventArgs e)
 {
     this.ProcessWebViewHeaderChanged(e);
 }