internal static ResDictDoc Load(string path) { var doc = new ResDictDoc(); doc.Load_(path); return(doc); }
public ResDictElement(ResDictDoc resDictDoc, XElement xElement) { ResDictDoc = resDictDoc; _Key = (string)xElement.Attribute(xNsX + "Key"); _Xml = xElement; _Obj = CreateObjectFromXml(); }
internal static ResDictElement FromXElement(ResDictDoc resDictDoc, XElement xElement) { if (xElement.Name == ResDictElement.xNs + "DrawingImage") { return(new DrawingImageResDictElement(resDictDoc, xElement)); } else { return(new ResDictElement(resDictDoc, xElement)); } }
public IDockDocument OpenFile(string path) { var doc = ResDictDoc.Load(path); return(XDrawCore.Instance.DockManager.ShowDocument(String.Format("ResDictDoc{0}", _NextDocId++), (context, id) => { return new ResDictDocControl(context, id) { Document = doc }; })); }
public static DrawingImageResDictElement CreateNew(ResDictDoc resDictDoc, string key) { return(new DrawingImageResDictElement(resDictDoc, XElement.Parse( "<DrawingImage x:Key=\"" + key + "\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\">" + "<DrawingImage.Drawing><DrawingGroup></DrawingGroup></DrawingImage.Drawing></DrawingImage>"))); }
public DrawingImageResDictElement(ResDictDoc resDictDoc, XElement xElement) : base(resDictDoc, xElement) { }