Could you tell me how to design the blend's control, and then get the special xaml? RRS feed

  • Question

  • In other words , what's the connection between cotrols and it's xaml ? Does it can be redesign by myself ?

    Thank you *(^+^)*

    Do yourself!
    Friday, April 1, 2011 6:22 AM

All replies

  • Yes you can. That is the advantage of xaml. In generell, controls are so called lookless. That means, they have standard style, which is defined in the template of a control. You can redesign the look (control styling) and feel (control skinning) by adding the template of a control.

    Do do that, it is best to first add a new ResourceDictionary, in which you save your custom style. Add nw item -> ResourceDictionary -> name it and click ok.

    Next you select the control you wish to style in the objects and timeline panel, right click -> edit template -> edit a copy. As the save target you choose the ResourceDictionary created earlier. Click ok.

    You are now in the template view and can edit the standard style with the modification of your choice.

    Be aware that some template have so called templte parts. These parts are essential for rhe functionality of the control. You can restyle them too, but your custom template need to have the elements which are defined as parts.

    The benefit of a ResourceDictionary is, that this is the best way to implement reusability for your custom styles. You cann even merge resourcedictionaries.

    Please post again if you need more help and advice.

    Friday, April 1, 2011 9:01 AM