{"record":{"id":"6f2091a268bf5d11","repo":"dotnet/wpf","slug":"sr-epguidnotfound","errorCode":null,"errorMessage":"SR.EPGuidNotFound","messagePattern":"SR\\.EPGuidNotFound","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/DrawingAttributes.cs","lineNumber":943,"sourceCode":"                }\n            }\n        }\n\n        /// <summary>\n        /// All DrawingAttributes are backed by an ExtendedProperty\n        /// this is a simple helper to set a property\n        /// </summary>\n        /// <param name=\"id\">id</param>\n        /// <returns></returns>\n        private object GetExtendedPropertyBackedProperty(Guid id)\n        {\n            if (!_extendedProperties.Contains(id))\n            {\n                if (null != DrawingAttributes.GetDefaultDrawingAttributeValue(id))\n                {\n                    return DrawingAttributes.GetDefaultDrawingAttributeValue(id);\n                }\n                throw new ArgumentException(SR.EPGuidNotFound, nameof(id));\n            }\n            else\n            {\n                return _extendedProperties[id];\n            }\n        }\n\n        /// <summary>\n        /// A help method which fires INotifyPropertyChanged.PropertyChanged event\n        /// </summary>\n        /// <param name=\"e\"></param>\n        private void PrivateNotifyPropertyChanged(PropertyDataChangedEventArgs e)\n        {\n            if ( e.PropertyGuid == KnownIds.Color)\n            {\n                OnPropertyChanged(nameof(Color));\n            }\n            else if ( e.PropertyGuid == KnownIds.StylusTip)","sourceCodeStart":925,"sourceCodeEnd":961,"githubUrl":"https://github.com/dotnet/wpf/blob/81131a70a4c573cd62748a5c36908fc4d662daa9/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/DrawingAttributes.cs#L925-L961","documentation":"DrawingAttributes stores standard properties (Color, StylusTip, Height, Width, etc.) in an ExtendedProperties collection keyed by GUID. GetExtendedPropertyBackedProperty throws this ArgumentException when the GUID is not present and no default value exists for it. It means you asked for an extended property that was never set.","triggerScenarios":"Calling GetExtendedPropertyBackedProperty (via DrawingAttributes property getters or GetExtendedProperty) with a GUID that is not in _extendedProperties and has no registered default value — e.g. a custom GUID never added via AddPropertyData.","commonSituations":"Typo'd or misremembered custom property GUIDs; reading property data from ink serialized on another platform that omitted the property; consuming third-party ink that lacks expected GUIDs.","solutions":["Verify the GUID matches exactly the one used in AddPropertyData","Check ContainsPropertyData(guid) or _extendedProperties.Contains before reading","Handle ArgumentException and fall back to DrawingAttributes.GetDefaultDrawingAttributeValue(guid)"],"exampleFix":"// before\nvar v = attrs.GetPropertyData(myGuid);\n// after\nvar v = attrs.ContainsPropertyData(myGuid) ? attrs.GetPropertyData(myGuid) : DrawingAttributes.GetDefaultDrawingAttributeValue(myGuid);","handlingStrategy":"validation","validationCode":"if (attrs.ContainsPropertyData(guid)) { var v = attrs.GetPropertyData(guid); } else { var v = DrawingAttributes.GetDefaultDrawingAttributeValue(guid); }","typeGuard":"bool HasProperty(DrawingAttributes a, Guid g) => a.ContainsPropertyData(g);","tryCatchPattern":"try { v = attrs.GetPropertyData(guid); } catch (ArgumentException) { v = DrawingAttributes.GetDefaultDrawingAttributeValue(guid); }","preventionTips":["Always check ContainsPropertyData before reading","Constant-define custom GUIDs in one place to avoid typos","Handle ink files from other platforms that may omit optional properties"],"tags":["wpf","ink","argumentexception","guid-not-found"],"backgroundTag":"resource-not-found","analyzedSha":"81131a70a4c573cd62748a5c36908fc4d662daa9","analyzedAt":"2026-09-14T10:12:48.479Z","contentChangedAt":"2026-09-14T10:12:48.479Z","schemaVersion":2},"datasetVersion":"2026-09-21T21:30:21.729Z"}