繁体   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