Featured post
WPF pre-render a list w/o actually showing it -
is there way "pre-render" list in wpf without showing user? have list renders ( few seconds ) first time displayed user.
i'd pre-render/pre-draw list few seconds takes display list users not noticeable. i'd happen while app starting - while splash screen displayed.
what best way accomplish this?
edit:
here list item style. can see target type button. button has routedevent (command) set on it.
<style x:key="button_productfinder_item" targettype="button"> <setter property="control.template"> <setter.value> <controltemplate targettype="button"> <grid width="690" height="181" > <image name="up" source="{staticresource img_productfinder_friendup}" stretch="uniform"/> <image name="down" source="{staticresource img_productfinder_frienddn}" visibility="hidden" stretch="uniform"/> <canvas name="clip" cliptobounds="true" height="162" width="175" horizontalalignment="left" margin="0,10,0,0" > <image name="dynamicfriend" stretch="uniformtofill" canvas.left="16" canvas.top="-10" horizontalalignment="left" source="{binding imagesource}" height="162" width="162" /> <canvas.rendertransform> <transformgroup> <translatetransform /> </transformgroup> </canvas.rendertransform> </canvas> <textblock name="dynamicname" margin="210,69,0,0" style="{staticresource buttonfriend_textstyle}" textwrapping="wrap" horizontalalignment="left" width="440" verticalalignment="stretch" height="auto" text="{binding productname}" /> </grid> <controltemplate.triggers> <trigger property="ispressed" value="true"> <setter targetname="up" property="visibility" value="hidden"/> <setter targetname="down" property="visibility" value="visible"/> <setter targetname="clip" property="rendertransform"> <setter.value> <transformgroup> <translatetransform y="2"/> </transformgroup> </setter.value> </setter> <setter targetname="dynamicname" property="rendertransform"> <setter.value> <transformgroup> <translatetransform y="2"/> </transformgroup> </setter.value> </setter> <setter targetname="dynamicname" property="foreground" value="#ffffff"/> <trigger.enteractions> <ctrls:buttonsoundplayeraction soundfile="buttonclick.wav"/> </trigger.enteractions> </trigger> </controltemplate.triggers> </controltemplate> </setter.value> </setter> </style>
check slow. really. itf db filling list, question totally off (as perforamnce not wpf realted).
how large list? have list of 5000 elements rendering in moments notice. mosty because 4.0 virtual list renders on list. not data bound while fillng list, or?
finally, slow in rndering? use wpf profiler find out , tell - because @ nd of day may try optimize wrong thing.
- Get link
- X
- Other Apps
Comments
Post a Comment