C# wpf binding to a binding -
i'm writing questionnnaire library c# wpf. in have usercontrol called multiplechoiceoption . has dependencyproperty optiontype . if optiontype "combobox" insert combobox. i want able bind itemssource of combobox dependencyproperty of multiplechoiceoption created this: public static readonly dependencyproperty multiplechoicecomboboxitemsproperty = dependencyproperty.register("comboboxitems", typeof(list<string>), typeof(multiplechoiceoption)); ... public list<string> optiontext { { return getvalue(multiplechoiceoptiontextproperty) list<string>; } set { setvalue(multiplechoiceoptiontextproperty, value); } } if optiontype "combobox" add combobox , set binding this: case "combobox": var combobox = new combobox { horizontalalignment = horizontalalignment.right }; var b = new binding()