private static void LoadSample(RadDiagram diagram, string name) { diagram.Clear(); using (var stream = ExtensionUtilities.GetStream(string.Format("/Common/SampleDiagrams/{0}.xml", name))) { using (var reader = new StreamReader(stream)) { var xml = reader.ReadToEnd(); if (!string.IsNullOrEmpty(xml)) { diagram.Load(xml); } } } diagram.Dispatcher.BeginInvoke(new Action(() => diagram.AutoFit()), System.Windows.Threading.DispatcherPriority.Loaded); }
private void Open(RadDiagram diagram, string Path) { if (diagram.GraphSource == null) { diagram.Clear(); } using (var stream = System.IO.File.OpenRead(Path)) { using (var reader = new System.IO.StreamReader(stream)) { var xml = reader.ReadToEnd(); if (!string.IsNullOrEmpty(xml)) { diagram.Load(xml); } } } }
public static void LoadSample(RadDiagram diagram, string name) { if (diagram.GraphSource == null) { diagram.Clear(); } using (var stream = ExtensionUtilities.GetStream(string.Format("/View/Diagrams/Common/SampleDiagrams/{0}.xml", name))) { using (var reader = new StreamReader(stream)) { var xml = reader.ReadToEnd(); if (!string.IsNullOrEmpty(xml)) { diagram.Load(xml); } } } #if WPF diagram.Dispatcher.BeginInvoke(new Action(() => diagram.AutoFit()), System.Windows.Threading.DispatcherPriority.ApplicationIdle); #else diagram.Dispatcher.BeginInvoke(new Action(() => diagram.AutoFit())); #endif }
public static void LoadDiagram(RadDiagram diagram, string name) { diagram.Clear(); using (var stream = ExtensionUtilities.GetStream(string.Format("{0}.xml", name), "Procbel.Apps.Silverlight.Modules.Inicio")) { using (var reader = new StreamReader(stream)) { var xml = reader.ReadToEnd(); if (!string.IsNullOrEmpty(xml)) { diagram.Load(xml); } } } #if WPF diagram.Dispatcher.BeginInvoke(new Action(() => diagram.AutoFit()), System.Windows.Threading.DispatcherPriority.Loaded); #else diagram.Dispatcher.BeginInvoke(new Action(() => diagram.AutoFit())); #endif }
private static void LoadSample(RadDiagram diagram, string name) { diagram.Clear(); using (var stream = ExtensionUtilities.GetStream(string.Format("/Common/SampleDiagrams/{0}.xml", name))) { using (var reader = new StreamReader(stream)) { var xml = reader.ReadToEnd(); if (!string.IsNullOrEmpty(xml)) { diagram.Load(xml); } } } diagram.Dispatcher.BeginInvoke(new Action(() => diagram.AutoFit())); }
public static void LoadSample(RadDiagram diagram, string name) { if (diagram.GraphSource == null) diagram.Clear(); using (var stream = ExtensionUtilities.GetStream(string.Format("/Common/SampleDiagrams/{0}.xml", name))) { using (var reader = new StreamReader(stream)) { var xml = reader.ReadToEnd(); if (!string.IsNullOrEmpty(xml)) { diagram.Load(xml); } } } #if WPF diagram.Dispatcher.BeginInvoke(new Action(() => diagram.AutoFit()), System.Windows.Threading.DispatcherPriority.ApplicationIdle); #else diagram.Dispatcher.BeginInvoke(new Action(() => diagram.AutoFit())); #endif }
private static void LoadSample(RadDiagram diagram, string name) { diagram.Clear(); using (var stream = FeatureUtilities.GetStream(string.Format("/SampleDiagrams/{0}.xml", name))) { using (var reader = new StreamReader(stream)) { var xml = reader.ReadToEnd(); if (!string.IsNullOrEmpty(xml)) { diagram.Load(xml); } } } }