개정판 3074202c
issue #1127 : TextControl, ArrowTextContol 각각 컨트롤에 Customizing Cursor를 적용
기존 Caret에 대한 처리는 Color를 Transparent 를 주어, 투명화 만들었다.
Database에서 불러온 각각 컨트롤에 대해 생성자에서 ApplyTemplate을 적용해줘야, TextBox안의 지정된 된 인덱스에 있는 문자의 선행 모서리에 대한 사각형 Caret의 위치를 알아 낼 수 있다.
Change-Id: I38c55393118686179fc8f762f82cc54c09cf87bb
MarkupToPDF/Themes/generic.xaml | ||
---|---|---|
343 | 343 |
</TextBlock> |
344 | 344 |
</Border> |
345 | 345 |
|
346 |
|
|
346 | 347 |
<TextBox x:Name="PART_TextBox" Text="{TemplateBinding Text}" Foreground="{TemplateBinding StrokeColor}" IsTabStop="False" AcceptsTab="False" |
347 |
Visibility="{Binding TextBoxVisibility, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Padding="2" |
|
348 |
TextWrapping="Wrap" Background="{TemplateBinding BackColor}" FontSize="{TemplateBinding TextSize}" AcceptsReturn="True" |
|
349 |
FontFamily="{TemplateBinding TextFamily}" FontStyle="{TemplateBinding TextStyle}" FontWeight="{TemplateBinding TextWeight}" |
|
350 |
> |
|
348 |
Visibility="{Binding TextBoxVisibility, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Padding="2"
|
|
349 |
TextWrapping="Wrap" Background="{TemplateBinding BackColor}" FontSize="{TemplateBinding TextSize}" AcceptsReturn="True"
|
|
350 |
FontFamily="{TemplateBinding TextFamily}" FontStyle="{TemplateBinding TextStyle}" FontWeight="{TemplateBinding TextWeight}"
|
|
351 |
>
|
|
351 | 352 |
</TextBox> |
353 |
|
|
354 |
|
|
355 |
<Canvas> |
|
356 |
<Border x:Name="Caret" |
|
357 |
Visibility="Collapsed" |
|
358 |
Canvas.Left="0" |
|
359 |
Canvas.Top="0" |
|
360 |
Width="3" |
|
361 |
Height="33" |
|
362 |
Background="Red"> |
|
363 |
<Border.Triggers> |
|
364 |
<EventTrigger RoutedEvent="Border.Loaded"> |
|
365 |
<BeginStoryboard> |
|
366 |
<Storyboard x:Name="CaretStoryBoard" |
|
367 |
RepeatBehavior="Forever"> |
|
368 |
<ColorAnimationUsingKeyFrames |
|
369 |
Storyboard.TargetProperty="Background.Color" |
|
370 |
Duration="0:0:0:1" |
|
371 |
FillBehavior="HoldEnd"> |
|
372 |
<ColorAnimationUsingKeyFrames.KeyFrames > |
|
373 |
<DiscreteColorKeyFrame KeyTime="0:0:0.750" Value="Transparent" /> |
|
374 |
<DiscreteColorKeyFrame KeyTime="0:0:0.000" Value="Black"/> |
|
375 |
</ColorAnimationUsingKeyFrames.KeyFrames> |
|
376 |
</ColorAnimationUsingKeyFrames> |
|
377 |
</Storyboard> |
|
378 |
</BeginStoryboard> |
|
379 |
</EventTrigger> |
|
380 |
</Border.Triggers> |
|
381 |
</Border> |
|
382 |
</Canvas> |
|
352 | 383 |
</Grid> |
353 | 384 |
|
354 | 385 |
<Path Stroke="Transparent" Data="{TemplateBinding PathDataInner}" RenderTransformOrigin="0,0" Canvas.ZIndex="0" IsHitTestVisible="False" |
... | ... | |
508 | 539 |
</TextBlock.RenderTransform> |
509 | 540 |
</TextBlock>--> |
510 | 541 |
|
511 |
<TextBox x:Name="PART_ArrowTextBox" |
|
512 |
Margin="0.5" Canvas.ZIndex="4" |
|
513 |
Background="{TemplateBinding TextBoxBackground}" |
|
514 |
BorderThickness="{TemplateBinding BorderSize}" |
|
515 |
BorderBrush="{TemplateBinding StrokeColor}" |
|
516 |
FontSize="{TemplateBinding TextSize}" |
|
517 |
FontFamily="{TemplateBinding TextFamily}" |
|
518 |
FontStyle="{TemplateBinding TextStyle}" |
|
519 |
FontWeight="{TemplateBinding TextWeight}" |
|
520 |
TextDecorations="{TemplateBinding UnderLine}" |
|
521 |
AcceptsReturn="True" |
|
522 |
Foreground="{TemplateBinding StrokeColor}" |
|
523 |
HorizontalAlignment="Stretch" |
|
524 |
TextWrapping="Wrap" |
|
525 |
Text="{TemplateBinding ArrowText}" |
|
526 |
RenderTransformOrigin="0.5,0.5"> |
|
527 |
<TextBox.RenderTransform> |
|
528 |
<RotateTransform Angle="{Binding Angle, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
|
529 |
CenterX="{Binding CenterX, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
|
530 |
CenterY="{Binding CenterY, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"> |
|
531 |
</RotateTransform> |
|
532 |
</TextBox.RenderTransform> |
|
533 |
</TextBox> |
|
542 |
|
|
543 |
<TextBox x:Name="PART_ArrowTextBox" |
|
544 |
Margin="0.5" Canvas.ZIndex="4" |
|
545 |
Background="{TemplateBinding TextBoxBackground}" |
|
546 |
BorderThickness="{TemplateBinding BorderSize}" |
|
547 |
BorderBrush="{TemplateBinding StrokeColor}" |
|
548 |
FontSize="{TemplateBinding TextSize}" |
|
549 |
FontFamily="{TemplateBinding TextFamily}" |
|
550 |
FontStyle="{TemplateBinding TextStyle}" |
|
551 |
FontWeight="{TemplateBinding TextWeight}" |
|
552 |
TextDecorations="{TemplateBinding UnderLine}" |
|
553 |
AcceptsReturn="True" |
|
554 |
Foreground="{TemplateBinding StrokeColor}" |
|
555 |
HorizontalAlignment="Stretch" |
|
556 |
TextWrapping="Wrap" |
|
557 |
Text="{TemplateBinding ArrowText}" |
|
558 |
RenderTransformOrigin="0.5,0.5"> |
|
559 |
<TextBox.RenderTransform> |
|
560 |
<RotateTransform Angle="{Binding Angle, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
|
561 |
CenterX="{Binding CenterX, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
|
562 |
CenterY="{Binding CenterY, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"> |
|
563 |
</RotateTransform> |
|
564 |
</TextBox.RenderTransform> |
|
565 |
</TextBox> |
|
566 |
|
|
567 |
<Canvas Canvas.ZIndex="5"> |
|
568 |
|
|
569 |
<Border x:Name="Caret" |
|
570 |
Visibility="Collapsed" |
|
571 |
Canvas.Left="0" |
|
572 |
Canvas.Top="0" |
|
573 |
Width="3" |
|
574 |
Height="33" |
|
575 |
Background="Red" |
|
576 |
|
|
577 |
RenderTransformOrigin="0.5,0.5"> |
|
578 |
<Border.RenderTransform> |
|
579 |
<RotateTransform Angle="{Binding Angle, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
|
580 |
CenterX="{Binding CenterX, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
|
581 |
CenterY="{Binding CenterY, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"> |
|
582 |
</RotateTransform> |
|
583 |
</Border.RenderTransform> |
|
584 |
<Border.Triggers> |
|
585 |
<EventTrigger RoutedEvent="Border.Loaded"> |
|
586 |
<BeginStoryboard> |
|
587 |
<Storyboard x:Name="CaretStoryBoard" |
|
588 |
RepeatBehavior="Forever"> |
|
589 |
<ColorAnimationUsingKeyFrames |
|
590 |
Storyboard.TargetProperty="Background.Color" |
|
591 |
Duration="0:0:0:1" |
|
592 |
FillBehavior="HoldEnd"> |
|
593 |
<ColorAnimationUsingKeyFrames.KeyFrames > |
|
594 |
<DiscreteColorKeyFrame KeyTime="0:0:0.750" Value="Transparent" /> |
|
595 |
<DiscreteColorKeyFrame KeyTime="0:0:0.000" Value="Black"/> |
|
596 |
</ColorAnimationUsingKeyFrames.KeyFrames> |
|
597 |
</ColorAnimationUsingKeyFrames> |
|
598 |
</Storyboard> |
|
599 |
</BeginStoryboard> |
|
600 |
</EventTrigger> |
|
601 |
</Border.Triggers> |
|
602 |
</Border> |
|
603 |
</Canvas> |
|
604 |
|
|
605 |
|
|
534 | 606 |
</Canvas> |
535 | 607 |
</ControlTemplate> |
536 | 608 |
</Setter.Value> |
내보내기 Unified diff