/// <summary> /// this method binds the subdataset annotation visibility with the curve to show IsSeries visible property, /// so upon checking visibility for curve, it should hide the annotations as well /// </summary> /// <param name="lineAnnotation"></param> public void LineAnnotationExtendedBinding(LineAnnotationExtended lineAnnotation) { lineAnnotation.SetBinding(LineAnnotationExtended.IsHiddenProperty, new Binding("IsSeriesVisible") { Source = this, Converter = new InverseBooleanConverter() }); lineAnnotation.SetBinding(LineAnnotationExtended.StrokeProperty, new Binding("LineColor") { Source = lineAnnotation.SubDataset, Converter = new ColourToBrushConverter() }); lineAnnotation.SetBinding(LineAnnotationExtended.StrokeThicknessProperty, new Binding("LineGrossor") { Source = lineAnnotation.SubDataset, Converter = new LineGrossorToStrokeThicknessConverter() }); lineAnnotation.SetBinding(LineAnnotationExtended.StrokeDashArrayProperty, new Binding("LineStyle") { Source = lineAnnotation.SubDataset, Converter = new SubDatasetLineStyleToStrokeDashArrayConverter() }); }
private void AddFormationBinding(LineAnnotationExtended annotation) { annotation.SetBinding(LineAnnotationExtended.IsHiddenProperty, new Binding("IsFormationVisible") { Mode = BindingMode.TwoWay, UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged, Source = IoC.Kernel.Get<IGlobalDataModel>().MainViewModel.GeologyMenu, Converter = new InverseBooleanConverter() }); }