XAML文件中的图像编辑 [英] Image Edit In XAML File
本文介绍了XAML文件中的图像编辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Silverlight业务应用程序中. mainpage.xaml中只有一张图像
像这样与style.xaml链接:
In Silverlight Business application . there is one image in mainpage.xaml
which is link with style.xaml like this :
<contentcontrol style="{StaticResource LogoIcon}">;
</contentcontrol>
icon.xaml中的icon属性定义如下:
somewhere in style.xaml the icon property define like this :
<Style x:Key="LogoIcon" TargetType="ContentControl">
<Setter Property="Height" Value="24"/>
<Setter Property="Width" Value="24"/>
<Setter Property="Margin" Value="0,1,10,0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ContentControl">
<Grid>
<Path UseLayoutRounding='False' Fill="{StaticResource HighLightColorBrush}" Stretch="Fill" Data="M8,0 C12.417931,2.8898596E-06 16,3.5814998 16,8 C16,12.417819 12.41803,16 8,16 C3.5816212,16 6.1398991E-06,12.417912 0,8 C1.5351338E-06,6.8954077 0.22386749,5.8431153 0.62867981,4.8860393 C0.65398115,4.82622 0.6799894,4.7667723 0.70669389,4.7077074 L0.73170543,4.6541386 L5.6357112,9.5581446 L3.7429986,11.450858 L3.7429986,11.493001 L11.669835,11.493001 L11.669835,3.5661643 L11.627691,3.5661643 L9.7349787,5.4588776 L4.8993444,0.62324351 L5.0666013,0.55490673 C5.5510159,0.36389247 6.0585575,0.21878535 6.5838675,0.12495131 C6.8465204,0.078035071 7.1136146,0.043936942 7.3844767,0.023327276 C7.5199089,0.013022465 7.6562829,0.0060896641 7.7935166,0.0026129775 C7.862133,0.00087448902 7.9309645,4.5157563E-08 8,0 z"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
我想为自己的项目更改图标.
我该怎么做?
I wanted to change my icon for my project .
How i do this ? How to edit this style sheet in VS2010 which give me humen readable format for changing this XAML file.
推荐答案
您在styles.xaml图标中所指的图标是矢量图标.要使用传统的位图图标,您需要按以下步骤更改MainPage.Xaml:
替换:
Hi,
The icon you are referring to in styles.xaml icons is a vector icon. To use a traditional bitmap icon you need to change you MainPage.Xaml as follow:
replace:
<ContentControl Style="{StaticResource LogoIcon}" DataContext="{Binding}" />
作者:
by:
<Image Height="32" Width="32" Source="Icons/check2-13.png"/>
不要忘记将图标添加到项目中;)
可以回答您的问题吗?
瓦莱里.
Don''t forget to add your icons to your project ;)
Is that answering your question?
Valery.
这篇关于XAML文件中的图像编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文