예제 #1
0
        static object OnFocusIndicatorCoerceCallback(DependencyObject d, object baseValue)
        {
            SequenceBlock sb        = (SequenceBlock)d;
            int           newColumn = sb.FocusedColumnIndex;

            return(newColumn >= sb.Column && newColumn <= sb.Column + sb.Count);
        }
예제 #2
0
        static object OnFocusedSymbolBrushCoerceCallback(DependencyObject d, object baseValue)
        {
            SequenceBlock sb = (SequenceBlock)d;

            return((sb.FocusedSymbol != null && sb.SequenceColorSelector != null)
                       ? sb.SequenceColorSelector.GetSymbolBrush(sb.FocusedSymbol)
                       : baseValue);
        }
예제 #3
0
        static object OnFocusedSymbolCoerceCallback(DependencyObject d, object baseValue)
        {
            SequenceBlock sb = (SequenceBlock)d;

            return((sb.Sequence != null && sb.FocusedColumnIndex >= 0 && sb.FocusedColumnIndex < sb.Sequence.Count)
                ? sb.Sequence[sb.FocusedColumnIndex]
                : null);
        }
 /// <summary>
 /// This is called to create the visual child
 /// </summary>
 /// <param name="owner"></param>
 internal void DrawVisualSequence(SequenceBlock owner)
 {
     // Nothing to do
     if (owner == null || owner.Sequence == null || owner.Count == 0)
     {
         Child = null;
     }
     else
     {
         if (Child == null || Child.FontFamily != owner.FontFamily || Child.FontSize != owner.FontSize)
         {
             Child = new SequenceTextDrawingVisual(owner.SequenceColorSelector, owner.Sequence, owner.FontFamily,
                                                   owner.FontSize);
         }
         Child.Render(owner.Column, owner.Count);
     }
 }
예제 #5
0
        static object OnFocusRectangleOffsetCoerceCallback(DependencyObject d, object baseValue)
        {
            SequenceBlock sb = (SequenceBlock)d;

            return((sb.FocusedColumnIndex - sb.Column) * sb.CellWidth);
        }