Browse Source

fixed SD-1778 - No Xaml completion for TextBlock FontFamily

pull/14/head
Siegfried Pammer 15 years ago
parent
commit
a5ac7aa860
  1. 4
      src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCodeCompletionBinding.cs

4
src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCodeCompletionBinding.cs

@ -220,9 +220,9 @@ namespace ICSharpCode.XamlBinding @@ -220,9 +220,9 @@ namespace ICSharpCode.XamlBinding
start = "";
completionList.PreselectionLength = start.Length;
} else if (mrr.ResolvedType.FullyQualifiedName == "System.Windows.Media.FontFamily") {
string text = context.ValueStartOffset > -1 ? context.RawAttributeValue.Substring(0, Math.Min(context.ValueStartOffset + 1, context.RawAttributeValue.Length)) : "";
string text = context.ValueStartOffset > -1 ? context.RawAttributeValue.Substring(0, Math.Min(context.ValueStartOffset, context.RawAttributeValue.Length)) : "";
int lastComma = text.LastIndexOf(',');
completionList.PreselectionLength = lastComma == -1 ? context.ValueStartOffset + 1 : context.ValueStartOffset - lastComma;
completionList.PreselectionLength = lastComma == -1 ? context.ValueStartOffset : context.ValueStartOffset - lastComma - 1;
}
}
}

Loading…
Cancel
Save