xaml - Silverlight ScrollViewer not working when containing multiple usercontrols -


i have page has header area , content area. content area contains 1 usercontrol. have class structure along lines of abstractclassa base class of classes displayed. abstract classes b & c both inherit a. concrete class b1 , b2 inherit b , concrete classes c1 , c2 inherit c.

this user control contains number of controls displaying information a, plus 2 additional controls 1 each b & c, made visible if class being displayed of relevant type.

those addituional controls display fields relevant corresponding abstract class, plus have additional controls relating concrete classes, again displayed when underlying class of correct type, have fields relating concrete class.

this working fine except of classes we're dealing have many fields don't fit on screen anymore. so, obvious thing - wrap content in scrollviewer.

only problem doesn't seem work.

the visibility of subsequent controls bound property on viewmodel (via bool visibility converter) determines type of class being dealt with. fallback value collapsed start invisible. not sure if required size somehow failing passed scrollviewer when subsequently? scrollbar doesn't appear, despite being set auto. xaml below

<grid x:name="layoutroot">   <!-- divide page row header , 1 further rows used position content -->   <grid.rowdefinitions>     <rowdefinition height="{staticresource headerrowheight}" />     <rowdefinition height="*" />     <rowdefinition height="100" />   </grid.rowdefinitions>     <grid grid.row="0"         grid.column="0"         grid.columnspan="2">     <!-- page header -->   </grid>    <!-- main page content follows -->   <grid grid.row="1"         width="auto">     <scrollviewer height="700"                   verticalscrollbarvisibility="auto">       <dataedit:casetypeinternaleditcontrol height="auto" />     </scrollviewer>   </grid> </grid> 

i've tried putting scrollviewer within user control, no avail. missing?

the problem wasn't apparent question, i'd have needed post 1 of subsequent child controls, visibility determined thus:

        <canvas visibility="{binding path=caseisb, converter={staticresource booleantovisibilityconverter}, fallbackvalue=collapsed}">             <dataeditcontrols:casebeditcontrol datacontext="{binding casebeditviewmodel}"  />         </canvas >         <canvas visibility="{binding path=caseisc, converter={staticresource booleantovisibilityconverter}, fallbackvalue=collapsed}">             <dataeditcontrols:caseceditcontrol datacontext="{binding caseceditviewmodel}"  />         </canvas > 

the problem being canvas object has size of 0 - wasn't registering scrollviewer when visible. switched out grid, worked fine...


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -