this.textStore.CompositionUpdated += textStore_CompositionUpdated;\r
this.textStore.CompositionEnded += textStore_CompositionEnded;\r
\r
- this.Document = new Document();\r
-\r
this.rectangle = new Windows.UI.Xaml.Shapes.Rectangle();\r
this.rectangle.Margin = this.Padding;\r
this.Render = new D2DRender(this,this.rectangle,this.textStore);\r
\r
+ this.Document = new Document(this.Render);\r
+\r
this.View = new EditView(this.Document, this.Render, new Padding(5, Gripper.HitAreaWidth, Gripper.HitAreaWidth / 2, Gripper.HitAreaWidth));\r
this.View.SrcChanged += View_SrcChanged;\r
this.View.InsertMode = this.InsertMode;\r
else\r
this._Controller.MoveCaretAndSelect(tp);\r
}\r
- if (this.peer != null)\r
- this.peer.OnNotifyCaretChanged();\r
- this.Refresh();\r
- return;\r
}\r
+ else\r
+ {\r
+ TextPoint tp = this.View.GetTextPointFromPostion(p);\r
+ this._Controller.MoveCaretAndSelect(tp);\r
+ }\r
+ if (this.peer != null)\r
+ this.peer.OnNotifyCaretChanged();\r
+ this.Refresh();\r
+ return;\r
}\r
if (e.Delta.Scale < 1)\r
{\r