コード例 #1
0
        private void InsertStyleProperty()
        {
            if (!StyleName.IsNotNullOrEmpty() || HasStyleSet != false)
            {
                return;
            }

            var newAttribute = Document.CreateAttribute("Style");

            newAttribute.Value = string.Format("{{StaticResource {0}}}", StyleName);
            Document.ChildNodes[0].Attributes.Append(newAttribute);
        }