2011-05-14 24 views

回答

1

不要使用Image作为静态的资源,因为你会只能使用一次。反而把BitmapImage的资源和参考,从您的Image

<Grid> 
    <Grid.Resources> 
     <BitmapImage UriSource="http://thecybershadow.net/misc/stackoverflow.png" x:Key="image"/> 
    </Grid.Resources> 
    <DockPanel> 
     <Image Source="{StaticResource image}"/> 
    </DockPanel> 
</Grid>