c# - How to Create fluent template which composed of couple of datatemplate -


i trying create fluent page being built other data template.

for example:

i have 2 datatemplates.

  • datatemplate1 => button , textblock in stackpanel. like:

    stackpanel << [button] textblockwithtext >> 
  • datatemplate2 => textblock , combobox in stackpanel. like:

    stackpanel << 11111111thisisnewtextblock >> [combobox] 

and after merge them, third template (something this:

stackpanel << datatemplate1 datatemplate 2 >> 

i not fluent. may in same line,

or in 2 line break in middle, like:

button text1 \n
text2 \n combox.

and want thing this: button \n text1 , half of text2 \n last half of text2 , combo box. (according amount of space of window).

so, find working wrapping way when using couple of datatemplates (wrapping panel not looking for. search way merge couple of datatemplates - let them wrap each other, won't different part).

i have tried work run in document impossible create datatemplate them.

any ideas?

thanks.

close enough ?

 <datatemplate>       <grid>          <grid.rowdefinitions>               <rowdefinition />               <rowdefinition />               <rowdefinition />          </grid.rowdefinitions>           <grid.columndefinitions>               <columndefinition/>               <columndefinition/>          </grid.columndefinitions>            <button grid.colspan="2" />          <textblock  grid.row="1" grid.colspan="2">                <run text="{binding text1}" />                <run text="{binding text2 , converter={staticresource stringtosubstringconverter,converterparameter=0}}" />           </textblock>           <text text="{binding text2 , converter={staticresource stringtosubstringconverter,converterparameter=1}}" grid.row="2"            <combobox grid.column="1" grid.row="2" />        </grid>    </datatemplate> 

1 , 0 converter parameter signifies lower half , upper half.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -