问题描述
这是我的椭圆形...
This is my Ellipse ...
<grid name="gd">
<grid.rowdefinitions>
<rowdefinition height="0*" />
<rowdefinition height="258*" />
</grid.rowdefinitions>
<stackpanel margin="0,15,-19,19" grid.row="1" flowdirection="LeftToRight">
<stackpanel.resources>
<local:secondsconverter x:key="secondsConverter" xmlns:x="#unknown" xmlns:local="#unknown" />
<local:minutesconverter x:key="minutesConverter" xmlns:x="#unknown" xmlns:local="#unknown" />
<local:hoursconverter x:key="hoursConverter" xmlns:x="#unknown" xmlns:local="#unknown" />
<local:weekdayconverter x:key="weekdayConverter" xmlns:x="#unknown" xmlns:local="#unknown" />
<Style x:Key="AnalogClock" TargetType="{x:Type customControl:Clock}">
<setter property="Template">
<setter.value>
<controltemplate targettype="{x:Type customControl:Clock}">
<grid>
<grid.columndefinitions>
<columndefinition width="280" />
</grid.columndefinitions>
<grid.rowdefinitions>
<rowdefinition height="280" />
</grid.rowdefinitions>
<ellipse name="Elips1" verticalalignment="Center" horizontalalignment="Center" width="280" height="280">Fill="Aqua" StrokeThickness="3" Opacity="22" OpacityMask="Blue">
<ellipse.bitmapeffect>
<dropshadowbitmapeffect color="DarkGoldenrod" opacity="1" shadowdepth="10" />
</ellipse.bitmapeffect>
<ellipse.stroke>
<lineargradientbrush>
<lineargradientbrush.gradientstops>
<gradientstop color="DarkBlue" offset="0" />
<gradientstop color="LightBlue" offset="1" />
</lineargradientbrush.gradientstops>
</lineargradientbrush>
</ellipse.stroke>
</ellipse>
</grid>
</controltemplate>
</setter.value>
</setter>
</Style>
</stackpanel.resources>
</stackpanel>
</grid>
我在组合框中有颜色名称.
我的问题是
1.我无法在.cs文件中找到此椭圆.
2.我无法将椭圆填充属性与组合框selectitem属性绑定...
请解决我的问题...
我从最近的10天开始尝试....
And I have color name in combo box..
My Problem is
1. I not able to find this ellipse in .cs file ..
2. i Not able to bind ellipse fill property with the combobox selectitem property...
Please Solve my problem...
I try from last 10 day this....
推荐答案
<ellipse name="Elips1" verticalalignment="Center" horizontalalignment="Center" width="280" height="280">Fill="Aqua" StrokeThickness="3" Opacity="22" OpacityMask="Blue">
<ellipse.bitmapeffect>
<dropshadowbitmapeffect color="DarkGoldenrod" opacity="1" shadowdepth="10" />
</ellipse.bitmapeffect>
<ellipse.stroke>
<lineargradientbrush>
<lineargradientbrush.gradientstops>
<gradientstop color="DarkBlue" offset="0" />
<gradientstop color="LightBlue" offset="1" />
</lineargradientbrush.gradientstops>
</lineargradientbrush>
</ellipse.stroke>
</ellipse>
椭圆存在,可以在代码中使用名称 Elips1 进行引用,并且可以对它的fill属性应用绑定.
不过,我确实注意到的是,您在 height ="280" 属性后似乎有多余的>",请尝试删除它. )
That there is your ellipse, it can be referenced in code by the name Elips1 and you can apply a binding to its fill attribute.
What i do notice, though, is that you seem to have a superfluous ''>'' after the height="280" attribute, try taking that out.. it''ll work better ;)
这篇关于在CS文件中查找椭圆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!