"This property is obsolete now. Use the TextPattern property instead."的警告解决办法

来源:互联网 发布:买鞋软件 编辑:程序博客网 时间:2024/06/05 17:16

最近在AE开发中用到了 DevExpress.XtraCharts.Series.Label.PointOptions这个属性,vs下编译出现如下警告


该警告的意思是项目中使用的这个属性已经过时,建议使用series.Label.TextPattern这个属性:

 //
        // 摘要: 
        //     Gets or sets a string which represents the pattern specifying the text to
        //     be displayed within series labels.
        [Category("Behavior")]
        [Editor("DevExpress.XtraCharts.Design.SeriesLabelTextPatternEditor,DevExpress.XtraCharts.v15.1.Wizard, Version=15.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a", typeof(UITypeEditor))]
        [XtraSerializableProperty]
        public string TextPattern { get; set; }

修改后:



这里总结一下TextPattern的用法:她是一个string类型的属性,表示数据标签上要显示的内容

其可选的值为{A}{V}{S} 一般的这是方式有series.Label.TextPattern = "{V}";//series.Label.TextPattern = "{V}{A}"等

{A}表示argument   {V}表示数据值      {S}表示series

如果series.Label.TextPattern=“”{A}//{V}//{S}“” ,则效果如下:



0 0
原创粉丝点击