当前位置: 代码迷 >> Silverlight >> Silverlight 的自定义控件转化成UserControl,该如何处理
  详细解决方案

Silverlight 的自定义控件转化成UserControl,该如何处理

热度:6970   发布时间:2013-02-26 00:00:00.0
Silverlight 的自定义控件转化成UserControl
如何把这个控件http://www.codeproject.com/Articles/38361/Circular-gauge-custom-control-for-Silverlight-3-an转换成基于UserControl 的UserControl 

可以贴这里,也可以发我的邮箱corereg@126.com

------解决方案--------------------------------------------------------
不明白你为什么要转为UserControl的UserControl,本身这段代码就是一个UserControl啊~~ 如果真要转为UserControl也只是在外面包了一层平白增加复杂度而已啊~~ 所以直接使用此控制就是了
            <gauge:CircularGaugeControl x:Name="myGauge4" Grid.Column="1" Grid.Row="1" 
                                        Radius="150" 
                                        ScaleRadius="110" 
                                        ScaleStartAngle="120" 
                                        ResetPointerOnStartUp="True"
                                        ScaleSweepAngle="300"
                                        PointerLength="85" 
                                        PointerCapRadius="35" 
                                        MinValue="0" 
                                        MaxValue="1000" 
                                        MajorDivisionsCount="10" 
                                        MinorDivisionsCount="5" 
                                        CurrentValue="{Binding Score}"
                                        ImageSource="silverlightlogo.png"
  相关解决方案