Beispiel #1
0
            internal static void Search(RichEditBoxCore Core)
            {
                ApplicationDataContainer localSettings =
                    ApplicationData.Current.LocalSettings;
                string SelectionText = Core.Document.Selection.Text;
                string SearchEngine  = localSettings.Values["SearchEngine"].ToString();

                if ((SelectionText.StartsWith("http://") || SelectionText.StartsWith("https://")) && SelectionText.Contains("."))
                {
                    WebResources.Navigate(SelectionText);
                }
                else
                {
                    if (SearchEngine == "Bing")
                    {
                        WebResources.Navigate("https://www.bing.com/search?q=" + SelectionText);
                    }
                    else if (SearchEngine == "Google")
                    {
                        WebResources.Navigate("https://www.google.com/search?q=" + SelectionText);
                    }
                    else if (SearchEngine == "Yahoo")
                    {
                        WebResources.Navigate("https://search.yahoo.com/search?p=" + SelectionText);
                    }
                }
            }
        public RichEditBoxPivotItem(Item listViewItem, RichEditBoxCore editBox)
        {
            listViewItem.PivotItem = this;
            _listViewItem          = listViewItem;

            Margin   = new Thickness(0, 0, 0, 0);
            Content  = editBox;
            _editBox = editBox;

            Padding = new Thickness(0, 0, 0, 0);
        }
Beispiel #3
0
        public RichEditBoxPivotItem(TextBlock headerTextBlock, Item listViewItem, RichEditBoxCore editBox)
        {
            headerTextBlock.FontSize = 18;
            Header           = headerTextBlock;
            _headerTextBlock = headerTextBlock;

            headerTextBlock.CanDrag = true;

            listViewItem.PivotItem = this;
            _listViewItem          = listViewItem;

            Margin   = new Thickness(0, 0, 0, 0);
            Content  = editBox;
            _editBox = editBox;

            Padding = new Thickness(0, 0, 0, 0);
        }
Beispiel #4
0
 public RichEditBoxCoreText(RichEditBoxCore core)
 {
     _core = core;
 }
 public ICoreTextSelection(RichEditBoxCore core)
 {
     _core = core;
 }
 public RichEditBoxCoreText(RichEditBoxCore core)
 {
     _core     = core;
     Selection = new ICoreTextSelection(_core);
 }
Beispiel #7
0
 internal static void Lowercase(RichEditBoxCore Core)
 {
     Core.Document.Selection.ChangeCase(LetterCase.Lower);
 }
Beispiel #8
0
 internal static void RemoveHighlight(RichEditBoxCore Core)
 {
     Core.Document.Selection.CharacterFormat.BackgroundColor =
         Colors.White;
 }
Beispiel #9
0
 internal static void Highlight(RichEditBoxCore Core)
 {
     Core.Document.Selection.CharacterFormat.BackgroundColor =
         Colors.LimeGreen;
 }
Beispiel #10
0
 internal static void SelectAll(RichEditBoxCore Core)
 {
     Core.CoreText.SelectAll();
 }
Beispiel #11
0
 internal static void Paste(RichEditBoxCore Core)
 {
     Core.CoreText.Paste();
 }
Beispiel #12
0
 internal static void Copy(RichEditBoxCore Core)
 {
     Core.CoreText.Copy();
 }
Beispiel #13
0
 internal RichEditBoxMenuEvents(RichEditBoxCore Core)
 {
     _core = Core;
 }
Beispiel #14
0
 internal static void Paste(RichEditBoxCore Core)
 {
     Core.Document.Selection.Paste(1);
 }
Beispiel #15
0
 internal static void Copy(RichEditBoxCore Core)
 {
     Core.Document.Selection.Copy();
 }