2011-05-14 23 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>