Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. Text box default text

Text box default text

Scheduled Pinned Locked Moved WPF
csharpwpftutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    columbos14927
    wrote on last edited by
    #1

    Hello, I'm creating a log in window with 2 text boxes. One text box for user name and the second text box for password. I want the text boxes to show default almost transparent text and when the user starts to type inside the text box the text will disappear. For example in the password text box will be written "PASSWORD". How can i do this in WPF text box. Thanks

    A 1 Reply Last reply
    0
    • C columbos14927

      Hello, I'm creating a log in window with 2 text boxes. One text box for user name and the second text box for password. I want the text boxes to show default almost transparent text and when the user starts to type inside the text box the text will disappear. For example in the password text box will be written "PASSWORD". How can i do this in WPF text box. Thanks

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      A WatermarkTextBox in 3 lines of XAML[^] should pretty much solve your problem.

      WP Apps - Color Search | Arctic | XKCD | Sound Meter | Speed Dial

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups