void DoSetterAndEventSetterCompletion(XamlCompletionContext context, XamlCompletionItemList completionList)
        {
            string typeNameString;
            int    dotIndex;
            IType  typeName = ResolveTargetType(context, out typeNameString, out dotIndex,
                                                string.Equals(context.Attribute.Name, "Property") ||
                                                string.Equals(context.Attribute.Name, "Event"));

            MemberResolveResult mrr;

            switch (context.Attribute.Name)
            {
            case "Value":
                AttributeValue propType = MarkupExtensionParser.ParseValue(context.ActiveElement.GetAttributeValue("Property") ?? "");

                if (!propType.IsString)
                {
                    break;
                }

                context.Description = XamlContextDescription.AtTag;

                string name = propType.StringValue;

                if (!name.Contains("."))
                {
                    name = typeNameString + "." + name;
                }

                mrr = resolver.ResolveExpression(name, context) as MemberResolveResult;

                if (mrr == null || mrr.Member == null)
                {
                    break;
                }

                completionList.Items.AddRange(
                    generator.MemberCompletion(context, mrr.Member.ReturnType, string.Empty)
                    );
                break;

            case "Property":
                completionList.Items.AddRange(
                    typeName.GetProperties()
                    .Where(p => p.IsPublic && p.CanSet)
                    .Select(prop => new XamlCompletionItem(prop))
                    );
                if (dotIndex == -1)
                {
                    completionList.Items.AddRange(
                        generator.GetTypesForPropEventNameCompletion(context, true)
                        );
                }
                break;

            case "Event":
                completionList.Items.AddRange(
                    typeName.GetEvents()
                    .Where(e => e.IsPublic)
                    .Select(evt => new XamlCompletionItem(evt))
                    );
                if (dotIndex == -1)
                {
                    completionList.Items.AddRange(
                        generator.GetTypesForPropEventNameCompletion(context, true)
                        );
                }
                break;

            case "Handler":
                var            loc3    = context.Editor.Document.GetLocation(XmlParser.GetActiveElementStartIndex(context.Editor.Document.Text, context.Editor.Caret.Offset));
                AttributeValue evtType = MarkupExtensionParser.ParseValue(context.ActiveElement.GetAttributeValue("Event") ?? "");
                if (!evtType.IsString)
                {
                    break;
                }

                string evtName = evtType.StringValue;

                if (!evtName.Contains("."))
                {
                    evtName = typeNameString + "." + evtName;
                }

                mrr = resolver.ResolveExpression(evtName, context) as MemberResolveResult;
                if (mrr == null)
                {
                    break;
                }
                var member = mrr.Member as IEvent;
                if (member == null)
                {
                    break;
                }

                completionList.Items.AddRange(generator.FindMatchingEventHandlers(context, member, typeName.Name));
                break;
            }
        }