c# - WPF StringCollection + TextBox -
applicationsetting: renamesettings - system.collections.specialized.stringcollection - user - *wall of text"
<application x:class="app.app" ... xmlns:properties="clr-namespace:app.properties" startupuri="mainwindow.xaml"> <application.resources> <properties:settings x:key="settings" /> </application.resources> </application> <window x:class="app.mainwindow" ... xmlns:p="clr-namespace:app.properties" height="{binding source={staticresource settings}, path=default.height, mode=twoway}" minheight="300" ... > <window.resources> <p:settings x:key="settings" /> </window.resources> <grid datacontext="{staticresource settings}"> <menu ... ... /> <label ... /> <textbox margin="12,129,12,12" name="textblock1" text="{binding source={staticresource settings}, path=default.renamesettings, mode=twoway}"/> </grid> </window>
stringcollection... i'd bind textbox, text, viewing/editing. following similar patterns i've seen here , there:
i've tried textbox, textblock, label (only shows word "(collection)")... how can bind elegantly?
i'm idiot... switched listbox itemssource...
<listbox margin="12,129,12,12" name="textblock1" itemssource="{binding source={staticresource settings}, path=default.renamesettings, mode=twoway}"/>
Comments
Post a Comment