private async void SetSeriesAfterBindingChanged(C1.Xaml.Chart.Series series) { await series.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { series.Binding = _binding; series.Dispose(); }); }
private void BindingOverlays(C1.Xaml.Chart.Series series, Data.OverlayType type) { Binding binding = new Binding(); binding.Path = new PropertyPath("OverlayTypes"); binding.Source = ViewModel.ViewModel.Instance; binding.Converter = new Converter.OverlayTypes2SeriesVisibilityConverter(); binding.ConverterParameter = type; BindingOperations.SetBinding(series, C1.Xaml.Chart.Finance.BollingerBands.VisibilityProperty, binding); }