Ejemplo n.º 1
0
        private static NListBoxItem CreateTestListBoxItem(NRichTextToHtmlExample example)
        {
            NListBoxItem item = new NListBoxItem(example.Title);

            item.Tag = example;
            return(item);
        }
Ejemplo n.º 2
0
        private void OnTestListBoxItemSelected(NSelectEventArgs <NListBoxItem> arg1)
        {
            NListBoxItem selectedItem = arg1.Item;

            if (selectedItem == null)
            {
                return;
            }

            NRichTextToHtmlExample example = selectedItem.Tag as NRichTextToHtmlExample;

            if (example == null)
            {
                return;
            }

            // Recreate the content of the Nevron rich text widget
            NDocumentBlock documentRoot = example.CreateDocument();

            NRichTextDocument document = new NRichTextDocument();

            document.Content = documentRoot;
            document.Evaluate();

            m_RichText.Document = document;
            ExportToHtml();
        }