SetTextBlockDisplayLevel() public static method

public static SetTextBlockDisplayLevel ( System.Windows.Controls.TextBlock textBlock, MessageLevelsEnum level ) : void
textBlock System.Windows.Controls.TextBlock
level MessageLevelsEnum
return void
Example #1
0
        /// <summary>
        /// Highlights the menu option links when clicked on.
        /// </summary>
        /// <param name="selectedTextBlock">The TextBlock the user clicked on.</param>
        private void SetSelectedTextBlock(TextBlock selectedTextBlock)
        {
            if (m_selectedTextBlock != null)
            {
                UIHelper.SetTextBlockDisplayLevel(m_selectedTextBlock, MessageLevelsEnum.None);
                m_selectedTextBlock.TextDecorations = TextDecorations.Underline;
            }

            if (selectedTextBlock != null)
            {
                UIHelper.SetTextBlockDisplayLevel(selectedTextBlock, MessageLevelsEnum.Selected);
                selectedTextBlock.TextDecorations = null;
                m_selectedTextBlock = selectedTextBlock;
            }
        }