this.gestureRecongnizer.ManipulationUpdated += gestureRecongnizer_ManipulationUpdated;
this.gestureRecongnizer.ManipulationCompleted += gestureRecongnizer_ManipulationCompleted;
- this.timer.Interval = new TimeSpan(0, 0, 0, 0, 500);
+ this.timer.Interval = new TimeSpan(0, 0, 0, 0, 16);
this.timer.Tick += this.timer_Tick;
this.timer.Start();
/// </summary>
public void Refresh()
{
- this.Refresh(this.View.PageBound);
+ this.Document.RequestRedraw();
}
/// <summary>
if (this.verticalScrollBar != null)
this.verticalScrollBar.Maximum = this.View.LayoutLines.Count;
this.IsEnabled = true;
+ this.Refresh(this.View.PageBound);
}
}
this.CreateTextContext();
this.View.IsFocused = true;
+ this.timer.Start();
this.Refresh();
}
this.RemoveTextContext();
this.View.IsFocused = false;
- this.Refresh();
+ this.Refresh(this.View.PageBound);
+ this.timer.Stop();
}
private void CreateTextContext()
void timer_Tick(object sender, object e)
{
if (this.View.LayoutLines.HilightAll() || this.View.LayoutLines.GenerateFolding() || this.Document.IsRequestRedraw)
+ {
this.Refresh(this.View.PageBound);
+ }
}
private void SetDocument(Document value)
this.InputBindings.Add(new InputBinding(FooTextBoxCommands.ToggleCodePoint, new KeyGesture(Key.X, ModifierKeys.Alt)));
this.timer = new DispatcherTimer();
- this.timer.Interval = new TimeSpan(0, 0, 0, 0, 100);
+ this.timer.Interval = new TimeSpan(0, 0, 0, 0, 16);
this.timer.Tick += new EventHandler(timer_Tick);
this.Loaded += new RoutedEventHandler(FooTextBox_Loaded);
/// </summary>
public void Refresh()
{
- this.Refresh(this.View.PageBound);
+ this.Document.RequestRedraw();
}
/// <summary>
this.verticalScrollBar.Maximum = this.View.LayoutLines.Count;
this.View.CalculateLineCountOnScreen();
this.IsEnabled = true;
+ this.Refresh(this.View.PageBound);
}
}
base.OnGotKeyboardFocus(e);
this.textStore.SetFocus();
this.View.IsFocused = true;
+ this.timer.Start();
this.Refresh();
}
{
base.OnLostKeyboardFocus(e);
this.View.IsFocused = false;
- this.Refresh();
+ //タイマーを止めるので強制的に再描写させる
+ this.Refresh(this.View.PageBound);
+ this.timer.Stop();
}
#endregion
#region Event
return;
if (this.Resize(this.image.ActualWidth, this.image.ActualHeight))
{
- this.Refresh();
+ this.Refresh(this.View.PageBound);
return;
}
bool updateAll = this.View.LayoutLines.HilightAll() || this.View.LayoutLines.GenerateFolding() || this.Document.IsRequestRedraw;
if (updateAll)
- this.Refresh();
+ this.Refresh(this.View.PageBound);
else
this.Refresh(this.View.GetCurrentCaretRect());
}