• 自定义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"];

  • 相关阅读:
    顺序容器2(用法)
    运算符重载
    IO相关3(string流)
    IO相关2(文件输入输出)
    C语言--指针
    Java---匿名类
    Andriod开发 --插件安装、环境配置、问题集锦
    ubuntu--vim 技巧
    ubuntu--命令大全
    各浏览器userAgent汇总
  • 原文地址:https://www.cnblogs.com/stone/p/1899314.html
Copyright © 2020-2023  润新知