WPF Custom Control: How to combine 2 controls into 1?
I need to create a WPF custom control that will c开发者_如何学编程ombine a label and a textbox, the label being on the left and the textbox on the right, side by side. I need that kind of control because I'm working on forms that all have the same pattern: label + field to fill. This control would have a LabelContent property and Text property or something like that.
Any advices on how to put that all together?
Thanks
You might want to use a UserControl instead of a CustomControl. It is designed to allow you to compose other controls into a single, reusable control.
精彩评论