{"record":{"id":"1bfba0b276d7cade","repo":"unoplatform/uno","slug":"expected-attached-property-path-to-be-member-acces","errorCode":null,"errorMessage":"Expected attached property path to be member access.","messagePattern":"Expected attached property path to be member access\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/Utils/XBindExpressionParser.CoreParser.cs","lineNumber":189,"sourceCode":"\t\t\telse\n\t\t\t{\n\t\t\t\tpath = ParseXBindIdentifier();\n\t\t\t}\n\n\t\t\twhile (true)\n\t\t\t{\n\t\t\t\tif (Current == '.')\n\t\t\t\t{\n\t\t\t\t\t_position++;\n\t\t\t\t\tif (Current == '(')\n\t\t\t\t\t{\n\t\t\t\t\t\t_position++;\n\n\t\t\t\t\t\tvar attachedPropertyPath = ParseXBindPath();\n\n\t\t\t\t\t\tif (attachedPropertyPath is not XBindMemberAccess memberAccess)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthrow new Exception(\"Expected attached property path to be member access.\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (Current != ')')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthrow new Exception(\"Expected ')' in attached property syntax.\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpath = new XBindAttachedPropertyAccess() { Member = path, PropertyClass = memberAccess.Path, PropertyName = memberAccess.Identifier };\n\n\t\t\t\t\t\t_position++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tpath = new XBindMemberAccess() { Path = path, Identifier = ParseXBindIdentifier() };\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (Current == '[')\n\t\t\t\t{","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/unoplatform/uno/blob/04183404888ea21b4e5bfa3493e8d5f15e972c3a/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/Utils/XBindExpressionParser.CoreParser.cs#L171-L207","documentation":"Thrown by the x:Bind path parser when processing attached property syntax 'Element.(Owner.Property)'. After consuming '.(' and recursively parsing the inner path, the parser expects the result to be an XBindMemberAccess node (i.e. 'Owner.Property' form). If it is anything else — a bare identifier, a literal, or a nested expression — this exception fires.","triggerScenarios":"Writing {x:Bind Element.(Something)} where 'Something' is a single identifier rather than 'Owner.Property'; or {x:Bind Element.(Owner.Property.SubProp)} where the inner parse yields a chain instead of a simple member access node.","commonSituations":"Misunderstanding the attached-property path syntax in x:Bind; omitting the class qualifier inside the parentheses; trying to use a property-chain or method call where only 'Class.Property' is accepted.","solutions":["Ensure the content inside '.(...)' is exactly 'ClassName.PropertyName' — two identifiers joined by a single dot.","Remove extra dots, sub-paths, or non-identifier tokens from inside the parentheses.","If you do not need an attached property, remove the '.(' syntax and use plain member access."],"exampleFix":"<!-- before -->\n<Text Text=\"{x:Bind MyElement.(Canvas.Left)}\" />  <!-- valid -->\n<Text Text=\"{x:Bind MyElement.(Left)}\" />          <!-- throws [281] -->\n<!-- after -->\n<Text Text=\"{x:Bind MyElement.(Canvas.Left)}\" />","handlingStrategy":"validation","validationCode":"// Validate that attached-property x:Bind paths follow Element.(Class.Property):\n// The inner parenthesized content must be exactly two identifiers joined by one dot.\n// Regex check (for a linting tool):\n//   \\{x:Bind\\s+\\w+\\.\\(([A-Za-z_]\\w*)\\.([A-Za-z_]\\w*)\\)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Memorize the attached-property x:Bind pattern: Element.(ClassName.PropertyName).","Keep a reference snippet handy for attached property bindings.","Avoid putting property chains or single identifiers inside the '.()' group."],"tags":["xbind","xaml","parser","source-generator","attached-property"],"backgroundTag":null,"analyzedSha":"04183404888ea21b4e5bfa3493e8d5f15e972c3a","analyzedAt":"2026-08-13T21:08:11.651Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}