Windows Phone thumbnail display -


1)i getting images amazon server , displaying in grid view images not present want display default logo image in local.
2)which best way display image loading progress bar in each grid

 <image  source="defaultimage"   height="100" width="100" horizontalalignment="center" verticalalignment="center" x:name="imagedisplay"/> 

ok, lets start beginning.

during app load images - app must presents activity. best way - use progress bar that. new need - create smart own control, witch display progress bar , , when loading finished - display image. (if want can use image instead of progress bar)

note: code wp7

mysmartimage.xaml

    <usercontrol x:class="test.mysmartimage"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"     xmlns:toolkit="clr-namespace:microsoft.phone.controls;assembly=microsoft.phone.controls.toolkit"     mc:ignorable="d"    >      <grid width="80" height="80">         <border cornerradius="3" borderthickness="1" borderbrush="white" background="black">             <grid>                 <toolkit:performanceprogressbar x:name="pb" isindeterminate="true" margin="0"                       background="yellow" foreground="yellow" fontsize="20"                                                  borderthickness="0" d:layoutoverrides="gridbox" />                 <image width="80" height="80" source="{binding imagesourse}"                         imageopened="image_imageopened"/>             </grid>         </border>     </grid> </usercontrol> 

in mysmartimage.cs when fired image_imageopened hide progress bar

private void image_imageopened(object sender, system.windows.routedeventargs e)         {             pb.visibility = visibility.collapsed;         } 

and misc secret creating thumbnail images:
in viewmodel decode imagesource nested size:

get      {           return new bitmapimage(....) { decodepixelwidth = 200 };      } 

hope it's helps you.


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 -