Example #1
0
        /// <summary>
        /// Initializes a new <see cref="UIPageObject" /> with a <see cref="TextSequence" />.
        /// </summary>
        /// <param name="pageObject">A <see cref="PageObject" /> to use to populate and style this control.</param>
        /// <param name="storyData">The <see cref="Data" /> that corresponds to the loaded story.</param>
        /// <param name="style">A <see cref="Style" /> object describing how this object should be drawn.</param>
        protected UIPageObject(IPageObject pageObject, Data storyData, Style style)
        {
            TextBlock = new TextBlock {
                FontFamily   = new FontFamily("Cambria"),
                FontSize     = 24.0,
                TextWrapping = TextWrapping.WrapWithOverflow
            };

            FormattedText   = pageObject.DisplayText(storyData);
            PageObjectStyle = style;
        }