locked
Expression Blend: make style template of control without the chrome RRS feed

  • Question

  • I'm trying to make style templates of my controls.

    Only the default controls all stick to there microsoft-Chrome template.

    I managed to convert a rectangle to a button and I got the style template without the microschoft Chrome template settings (edge).

    Now I continue with a Combobox and I get the same crap. I need to trow out the chrome-templates, make a new background and make a new combobox controle out of it.

    Is there a easy way to make a default button and control it's style template easier for the many states?

    Monday, May 27, 2013 2:00 PM

All replies

  • You can make controls look just about however you would like. You can even just make your own theme by customizing either the original Control Templates or making copies of them and applying them globally so you don't have to explicitly set them on each instance.

    For example, if you right-click a control using Blend (like a ComboBox for example) and choose "Edit Template -> Edit a Copy" and save it to your own resource dictionary you should have all your VisualStateManager and objects stuff saved as a separate Control Template you can then edit to your hearts content. Then go back to your default Resource Dictionary and at the bottom you'll find something like;

    <Style TargetType="ComboBox" BasedOn="BlahBlahDefaultComboBoxTemplateName"/>

    Just cut that line out and paste it to the bottom of your resource dictionary or replace the BasedOn name with your new template name (so long as the other resource dict is referenced) and it will apply your new template globally.

    There's lots of tutorials out on the web to explain further, hope this helps...





    Please mark answers as helpful when used, and answered when completed.


    Wednesday, May 29, 2013 3:53 PM