簡體   English   中英

OxyPlot沒有更新標題

[英]OxyPlot is not updating title

我正在使用OxyPlot在WPF / .net 4.5下的用戶控件上顯示圖表,並具有以下XAML:

<oxy:Plot x:Name="oxyPlot" Title="{Binding ChartTitle}" Model="{Binding Plot}" />

在我的代碼隱藏中:

public string ChartTitle
{
    get { return (string)GetValue(ChartTitleProperty); }
    set { SetValue(ChartTitleProperty, value); }
}
public static readonly DependencyProperty ChartTitleProperty =
    DependencyProperty.Register("ChartTitle", typeof(string), typeof(ChartControl), new PropertyMetadata("OMICRON Lab Chart"));

然后從外部設置此屬性,但是一旦分配了PlotModel ,OxyPlot似乎會忽略對此的任何更改。 使用了通過PlotModel的構造函數提供的標題,但是更改模型的屬性(並調用RefreshPlot )也不會更改UI中的標題。

我究竟做錯了什么?

我不知道為什么,但是現在它正在工作...

我沒有更改標題的任何內容,但必須進行一些其他更改才能使其生效。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM