}\r
\r
/// <summary>\r
+ /// 指定行までスクロールする\r
+ /// </summary>\r
+ /// <param name="row">行</param>\r
+ /// <param name="alignTop">指定行を画面上に置くなら真。そうでないなら偽</param>\r
+ public void ScrollIntoView(int row, bool alignTop)\r
+ {\r
+ this.View.ScrollIntoView(row, alignTop);\r
+ }\r
+\r
+ /// <summary>\r
/// ファイルからドキュメントを構築する\r
/// </summary>\r
/// <param name="sr">StremReader</param>\r
this.Refresh();\r
}\r
\r
- void _textStore_InsertAtSelection(string i_value)\r
+ void _textStore_InsertAtSelection(string i_value,ref int o_stratIndex,ref int o_endIndex)\r
{\r
TextStoreHelper.InsertTextAtSelection(this._Controller, i_value);\r
this.Refresh();\r
public static void OnPropertyChanged(object sender, DependencyPropertyChangedEventArgs e)\r
{\r
FooTextBox source = (FooTextBox)sender;\r
+ if (e.Property.Equals(IndentModeProperty))\r
+ source.Controller.IndentMode = source.IndentMode;\r
if (e.Property.Equals(SelectionProperty) && !source.nowCaretMove)\r
source._Controller.Select(source.Selection.Index,source.Selection.Length);\r
if (e.Property.Equals(CaretPostionPropertyKey) && !source.nowCaretMove)\r
source.View.LineBreakCharCount = source.LineBreakCharCount;\r
if (e.Property.Equals(UpdateAreaProperty))\r
source.Render.UpdateArea = D2DRenderBase.ToColor4(source.UpdateArea);\r
+ if (e.Property.Equals(LineNumberProperty))\r
+ source.Render.LineNumber = D2DRenderBase.ToColor4(source.LineNumber);\r
if (e.Property.Equals(FlowDirectionProperty))\r
{\r
source.Render.RightToLeft = source.FlowDirection == Windows.UI.Xaml.FlowDirection.RightToLeft;\r
}\r
\r
/// <summary>\r
+ /// インデントの方法を表す\r
+ /// </summary>\r
+ public IndentMode IndentMode\r
+ {\r
+ get { return (IndentMode)GetValue(IndentModeProperty); }\r
+ set { SetValue(IndentModeProperty, value); }\r
+ }\r
+\r
+ /// <summary>\r
+ /// IndentModeの依存プロパティを表す\r
+ /// </summary>\r
+ public static readonly DependencyProperty IndentModeProperty =\r
+ DependencyProperty.Register("IndentMode", typeof(IndentMode), typeof(FooTextBox), new PropertyMetadata(IndentMode.Tab,OnPropertyChanged));\r
+\r
+ /// <summary>\r
/// 選択範囲を表す\r
/// </summary>\r
/// <remarks>\r
DependencyProperty.Register("OverwriteCaret", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.Black, OnPropertyChanged));\r
\r
/// <summary>\r
+ /// 行番号の色を表す\r
+ /// </summary>\r
+ public Windows.UI.Color LineNumber\r
+ {\r
+ get { return (Windows.UI.Color)GetValue(LineNumberProperty); }\r
+ set { SetValue(LineNumberProperty, value); }\r
+ }\r
+\r
+ /// <summary>\r
+ /// Using a DependencyProperty as the backing store for LineNumber. This enables animation, styling, binding, etc...\r
+ /// </summary>\r
+ public static readonly DependencyProperty LineNumberProperty =\r
+ DependencyProperty.Register("LineNumber", typeof(Windows.UI.Color), typeof(FooTextBox), new PropertyMetadata(Colors.DimGray,OnPropertyChanged));\r
+\r
+ /// <summary>\r
/// 余白を表す\r
/// </summary>\r
public new Thickness Padding\r