You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicclassVariableCompletionData:ICompletionData{publicIImage?Image=>null;publicstringText{get;}// Use this property if you want to show a fancy UIElement in the list.publicobjectContent=> Text;publicobjectDescription=>"Description for "+Text;publicdoublePriority{get;}=0;publicVariableCompletionData(stringtext){Text=text;}publicvoidComplete(TextAreatextArea,ISegmentcompletionSegment,EventArgsinsertionRequestEventArgs){
textArea.Document.Replace(completionSegment, Text);}}
privatevoidTextArea_TextEntering(object?sender,TextInputEventArgse){if(e.Text?.Length >0&&_completionWindow!=null){if(!char.IsLetterOrDigit(e.Text[0])){// Whenever a non-letter is typed while the completion window is open,// insert the currently selected element.
_completionWindow.CompletionList.RequestInsertion(e);}}}privatevoidTextArea_TextEntered(object?sender,TextInputEventArgse){if(e.Text =="."){_completionWindow=new CompletionWindow(Editor.TextArea);
_completionWindow.Closed +=(o,args)=>_completionWindow=null;vardata= _completionWindow.CompletionList.CompletionData;
data.Add(new VariableCompletionData("Item1"));
data.Add(new VariableCompletionData("Item2"));
data.Add(new VariableCompletionData("Item3"));
data.Add(new VariableCompletionData("Item4"));
data.Add(new VariableCompletionData("Item5"));
data.Add(new VariableCompletionData("Item6"));
data.Add(new VariableCompletionData("Item7"));
data.Add(new VariableCompletionData("Item8"));
data.Add(new VariableCompletionData("Item9"));
data.Add(new VariableCompletionData("Item10"));
data.Add(new VariableCompletionData("Item11"));
data.Add(new VariableCompletionData("Item12"));
data.Add(new VariableCompletionData("Item13"));
_completionWindow.Show();}}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: