I know it is a silly question, but I really don’t know what is happening.
I just want to create a hello world WPF application. All I want is only place a Label and a Textbox on the main Window.
Refer to the screen shoot.
– I drag and drop the Label ( OK no problem)
– I drag and drop the Textbox (Oh my GOD, going crazy), the Window just “grey” when I drop the Textbox, cannot add the Textbox.


I know it is a silly question, but I really don’t know what is
Share
WPF layout utilizes Xaml. You need to change designer thinking a bit, essentially a bit more like HTML and relative positioning rather than Winforms which relied on absolute positioning.
Start by reading up on the containers such as
DockPanel,StackPanel, andGrid. From here you define how controls will be laid out, then you position the controls.What you’re seeing is that the label is taking up the entire control area of the form (normally used for a Grid or other container) and when you’re trying to drag in a textbox it’s trying to put it inside the label. (not allowed.)