WPF RichTextBox CaretPosition

时间:2015-06-28 13:03:49

标签: c# wpf .net-4.5 richtextbox

我正在尝试在WPF中编写写字板(而不是记事本)。

public class MainActivity extends Activity implements LocationListener {


@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    LocationManager locManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
    locManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,0,this);

    this.onLocationChanged(null);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.menu_main, menu);
    return true;
}


@Override
public void onLocationChanged(Location location) {
    TextView textView = (TextView) findViewById(R.id.textView);
    if(location == null){textView.setText("--");}
else{textView.setText((int)location.getSpeed());}
}
}

我在使用它时遇到了问题。

  1. 撰写文字
  2. 将插入符号放在文本中间
  3. 更改文字大小
  4. 光标跳到运行结束

0 个答案:

没有答案