Пример #1
0
        /// <summary>
        ///     Gets non visual drawing properties values (cNvPr).
        /// </summary>
        /// <returns>(identifier, hidden, name)</returns>
        public static (int, bool, string) GetNvPrValues(this OpenXmlCompositeElement compositeElement)
        {
            // .First() is used instead .Single() because group shape can have more than one id for its child elements
            var cNvPr             = compositeElement.GetNonVisualDrawingProperties();
            var id                = (int)cNvPr.Id.Value;
            var name              = cNvPr.Name.Value;
            var parsedHiddenValue = cNvPr.Hidden?.Value;
            var hidden            = parsedHiddenValue != null && parsedHiddenValue == true;

            return(id, hidden, name);
        }