Пример #1
0
        internal static ResDictDoc Load(string path)
        {
            var doc = new ResDictDoc();

            doc.Load_(path);
            return(doc);
        }
Пример #2
0
        public ResDictElement(ResDictDoc resDictDoc, XElement xElement)
        {
            ResDictDoc = resDictDoc;

            _Key = (string)xElement.Attribute(xNsX + "Key");
            _Xml = xElement;
            _Obj = CreateObjectFromXml();
        }
Пример #3
0
 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));
     }
 }
Пример #4
0
        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
                };
            }));
        }
Пример #5
0
 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>")));
 }
Пример #6
0
 public DrawingImageResDictElement(ResDictDoc resDictDoc, XElement xElement) :
     base(resDictDoc, xElement)
 {
 }