TabItem Header에 Image 넣기

1. Open up Blend with a Silverlight Application, drag and drop a TabControl on the form
2. Set the TabControl.TabPlacement=Left (based on your sample code)
3. Make sure you have the 2 default TabItems in there
4. Select a TabItem.
5. Right Click on the TabItem Header –> Edit Control Parts (Template) –> Edit Copy
6. In here, You’ll need to edit the 2 base elements “TemplateLeftSelected” & “TemplateLeftUnselected”.
7. For instance, select “TemplateLeftSelected”, drill down into TemplateLeftSelected –> Border –> Border –> Grid –> Rectangle. And delete the rectangle. That’ll have the noticeable effect of removing the white background off the selected Tab Item. Just an example though.
8. Exit template editing and go back to normal user control editing. (By clicking the left most breadcrumb element on top of the form, or clicking the little top arrow icon just bellow the “Object and Timeline” text)
9. Select all the remaining TabItems (individually). Right click –> Edit Template –> Apply Resource –> TabItemTemplate1 (or whatever you named your TabItemTemplate). 

 

http://betaforums.silverlight.net/forums/t/90052.aspx

%d bloggers like this: