wpf - ItemTemplate - works wrong. Custom apperance and binding -



wpf - ItemTemplate - works wrong. Custom apperance and binding -

i have created own extendedtabcontrol totally alter it's apperance. works ok. have created closeabletabitem control. works well. however... far have manually set closeabletabitem in extendedtabcontrol way:

<etc:extendedtabcontrol> <etc:closeabletabitem header="first item"> <...some content... /> </etc:closeabletabitem> </etc:extendedtabcontrol>

now want bind observablecollection extendedtabcontrol. objects within collection contains: header , contenttext. set itemsource, ok, works. how can create tabitems closeabletabitems? more, how bind class objects closeabletabitems? have noticed tabcontrol has property called itemtemplate, setting not alter it's apperance totally. there still background can't change. apperance works, binding not or bindings work, apperance partly. can do? please help.

in extendedtabcontrol code need alter item container generated items closabletabitem:

public class extendedtabcontrol : tabcontrol { protected override dependencyobject getcontainerforitemoverride() { homecoming new closeabletabitem(); } }

(there related method, isitemitsowncontaineroverride, might want override)

tabcontrols have 2 template can set, contenttemplate templates item content area, , itemtemplate should template header.

to modify other properties on generated tabs utilize itemcontainerstyle, has targettype of closabletabitem.

wpf data-binding custom-controls tabcontrol

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -