zoukankan      html  css  js  c++  java
  • 自定义Silverlight toolkit 里面的 Column Chart 的data point

    <Style x:Key="DataPointStyle1" TargetType="toolkit:ColumnDataPoint">
              <Setter Property="Width" Value="10"/>
              <Setter Property="Template">
                  <Setter.Value>
                      <ControlTemplate TargetType="toolkit:ColumnDataPoint">
                          <Grid>
                              <Rectangle
                                      Fill="{TemplateBinding Background}"
                                      Stroke="Black"/>
                              <Grid Background="Transparent"  Margin="0" HorizontalAlignment="Center" VerticalAlignment="Top">
                                  <TextBlock  Text="{TemplateBinding FormattedDependentValue}"  FontWeight="Bold"  Margin="0,-20,0,0" VerticalAlignment="Bottom"   HorizontalAlignment="Center" />
                              </Grid>

                              <TextBlock  Text="{TemplateBinding FormattedIndependentValue}"  FontWeight="Bold"  Margin="0,-20,0,0" VerticalAlignment="Bottom"   HorizontalAlignment="Center" />

                          </Grid>
                      </ControlTemplate>
                  </Setter.Value>
              </Setter>
          </Style>

    In Code Behind:

    line.DataPointStyle = (Style)Resources["DataPointStyle1"];

  • 相关阅读:
    HDU 2955 Robberies(01背包)
    HDU 2602 Bone Collector(01背包)
    HUST 1352 Repetitions of Substrings(字符串)
    HUST 1358 Uiwurerirexb jeqvad(模拟解密)
    HUST 1404 Hamming Distance(字符串)
    HDU 4520 小Q系列故事――最佳裁判(STL)
    HDU 2058 The sum problem(枚举)
    【破解】修改程序版权、添加弹窗
    HDU 1407 测试你是否和LTC水平一样高(枚举)
    HDU 1050 Moving Tables(贪心)
  • 原文地址:https://www.cnblogs.com/stone/p/1899314.html
Copyright © 2011-2022 走看看