Ejemplo n.º 1
0
 /// <summary>
 /// Called when we should show the content
 /// </summary>
 /// <param name="post"></param>
 public void OnPrepareContent(Post post)
 {
     m_markdownBox = new MarkdownTextBox();
     m_markdownBox.OnMarkdownReady += MarkdownBox_OnMarkdownReady;
     m_markdownBox.Markdown         = post.Selftext;
     ui_contentRoot.Children.Add(m_markdownBox);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Called when we should destroy the content
        /// </summary>
        public void OnDestroyContent()
        {
            // Clear the markdown
            if (m_markdownBox != null)
            {
                m_markdownBox.OnMarkdownReady -= MarkdownBox_OnMarkdownReady;
            }
            m_markdownBox = null;

            // Clear the UI
            ui_contentRoot.Children.Clear();
        }