locked
Set TextBlock Visibility by program RRS feed

  • Question

  • I want to show a TextBlock that is collapsed as default.

    I tried (VB)

            TextBlock.Visibility = Windows.UI.Xaml.Visibility.Visible

    But it does nothing. The TextBox remains invisible.

    What am I missing ?

    Thank you in advance for your insight.

    Tuesday, December 17, 2013 12:51 AM

Answers

  • That should make it visible, but other code may prevent it from being seen.

    Can you provide a more complete explanation of what the app is doing? What does the Xaml hosting the TextBlock look like? Can you share a minimal sample demonstrating the problem on your SkyDrive?

    --Rob

    • Marked as answer by Mitchb00 Tuesday, December 17, 2013 9:42 AM
    Tuesday, December 17, 2013 1:13 AM
    Moderator

All replies

  • That should make it visible, but other code may prevent it from being seen.

    Can you provide a more complete explanation of what the app is doing? What does the Xaml hosting the TextBlock look like? Can you share a minimal sample demonstrating the problem on your SkyDrive?

    --Rob

    • Marked as answer by Mitchb00 Tuesday, December 17, 2013 9:42 AM
    Tuesday, December 17, 2013 1:13 AM
    Moderator
  • Rob, I was probably very tired, I had placed the code in the wrong sub where it was never run -- corrected now and it works. Sorry for the confusion.
    Tuesday, December 17, 2013 9:41 AM