I'm suspecting the answer is no, but I just want confirmation before I move on - is there any easy way (as in, not re-templating) to hide things like the box that gets checked on a CheckBox, the drop-down arrow of a combo box, etc. without hiding the actual content being displayed?
views:
59answers:
5You can play some around with the Background or BorderBrush, but the answer is as you excepted: No..
You will need to restyle the control, but don't let the whole styling and templating scare you though.. Its actually quite easy once you get the hang of it ;)
the simplest way to display the content of ComboBox, CheckBox, etc. is to display a TextBlock in readonly mode.
You can easily make an UserControl with a DependencyProperty and show/hide your content.
You can create a very easy custom control to get what you need. for example for the checkbox, you can create a UserControl which have a checkbox with empty content and a textblock which contains your actual checkbox's text. this way you can simply usetriggers to hide the checkbox any time you want without altering its text. you can use this technic for combobox and others too.
You can disable the control/s in which case they cannot be interacted with but the text is still displayed.
Notice that you can have a checkbox like button using "ToggleButton", so you could use more or less use the same template as for your normal buttons (if you need them for toggling states).
The answer is YES, as you can actually template all controls a lot, without the need of creading custom controls. Just set the template in a style and add the style to the control.
oh i just reread your question .. the answer is NO, but have a look at the toggle button maybe its what you are looking for.