private static void OnSourceChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) { SvgCanvas viewbox = obj as SvgCanvas; if (viewbox == null) { return; } viewbox._sourceUri = (Uri)args.NewValue; if (viewbox._sourceUri == null) { viewbox.OnUnloadDiagram(); } else { viewbox.OnSettingsChanged(); } }
private static void OnStreamSourceChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) { SvgCanvas svgCanvas = obj as SvgCanvas; if (svgCanvas == null) { return; } svgCanvas._sourceStream = (Stream)args.NewValue; if (svgCanvas._sourceStream == null) { svgCanvas.OnUnloadDiagram(); } else { svgCanvas.OnSettingsChanged(); } }
private static void OnMessageStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SvgCanvas canvas = d as SvgCanvas; canvas.InvalidateVisual(); }