簡體   English   中英

UWP Xamarin 中的 Oxyplot 未更新

[英]Oxyplot in UWP Xamarin not updating

我似乎無法正確綁定到 Xamarin 中的 Oxyplot。 我閱讀了多個帖子,但無法弄清楚我的設置有什么問題。

XAML

<ContentPage.BindingContext>
    <local:MainViewModel />
</ContentPage.BindingContext>

<ContentPage.Content>
    
    <Grid>

        <Grid.RowDefinitions>
            <RowDefinition Height="500" />
        </Grid.RowDefinitions>

        <oxy:PlotView Grid.Row="0" Model="{Binding CandlestickPlotModel}" Background="Green"/>
        
    </Grid>
    
</ContentPage.Content>

視圖模型

class MainViewModel
{
    public PlotModel CandlestickPlotModel { get; set; }

    public MainViewModel()
    {
        CandlestickPlotModel = new PlotModel();

        CandlestickPlotModel.Title = "Title";
        CandlestickPlotModel.Background = OxyColors.LightBlue;
    }
}

當我跑步時,我得到一個綠色的盒子,但如果綁定可以工作,我會期待一個淺藍色的盒子。 誰能看到這段代碼有什么問題?

弄清楚了。 綁定沒有錯。 不支持 Oxyplot 1.0 和 Xamarin Forms 和 UWP。 安裝 Oxyplot.Xamarin.Forms 1.1.0-unstable 修復了該問題。

暫無
暫無

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

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