c# - Limit IntegerUpDown to a specific set of numbers on WPF -
i new wpf, , there need couldnt find no how (i know should possible since there similar object on c# forms) want limit dataset of integerupdown on wpf form s.t default value 1 64 powers of two, problem there no place (by google search , microsoft website) tells me how that, help?
i think ill go combobox have clue why might not recognize style? (its on same file...) im adding combobox -
<xctk:combobox canvas.left="334" canvas.top="80" formatstring="" maximum="64" minimum="2" name="integerupdownframeavg" style="{staticresource mycomboboxstyle}" text="0" value="0" width="60" datacontext="{binding}"> <comboboxitem content="1"></comboboxitem> <comboboxitem content="2"></comboboxitem> <comboboxitem content="4"></comboboxitem> <comboboxitem content="8"></comboboxitem> <comboboxitem content="16"></comboboxitem> <comboboxitem content="32"></comboboxitem> <comboboxitem content="64"></comboboxitem> </xctk:combobox>
that style -
<style x:key="mycomboboxstyle" targettype="xctk:combobox"> <setter property="fontsize" value="12" /> <setter property="foreground" value="white" /> <setter property="borderthickness" value="1" /> <setter property="background" value="#ff4a4a3c" /> <setter property="borderbrush" value="black" /> <setter property="width" value="60" /> <setter property="height" value="20" />
and included -
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
on header, dosent work though error missing assembly...
then why don't use combobox
:
<combobox name="intcombobox"> <comboboxitem content="1"></comboboxitem> <comboboxitem content="2"></comboboxitem> <comboboxitem content="4"></comboboxitem> <comboboxitem content="8"></comboboxitem> <comboboxitem content="16"></comboboxitem> <comboboxitem content="32"></comboboxitem> <comboboxitem content="64"></comboboxitem> </combobox>
Comments
Post a Comment