If I look at a template for an expander, it always has to have a ContentPresenter in its control template and the control knows to use that for the content shown when the expander is expanded. From there you can template out the control in all sorts
of cool ways.
A textbox's control templates need a scrollviewer with x:Name=PART_ContentHost for example.
The expander is fine with an unnamed control template, but the textbox requires a named scrollviewer. I haven't messed around with putting multiple content presenters in an expander's control template and I currently have no idea what that would do.
This aspect of building my own controls is still quite foggy to me. If I were to build a control, how do I determine if it looks for a named element in the control template (ala the textbox) or if it just finds a content presenter etc?
What if I wanted my new control to always contain several elements?
For example, with my current set of questions I am working on a resizable element. I want that to always contain a draggable left and right boundary, as well as a togglable UI element for each of those boundaries that will toggle certain behaviors when
I drag a specifc size and resize the control. So ideally, I would want to define all of those things in a control template. I would like it to
View Complete Post