|
65 | 65 | <ControlTemplate x:Key="TokenizingTextBoxTemplate" |
66 | 66 | TargetType="controls:TokenizingTextBox"> |
67 | 67 | <Grid Name="RootPanel"> |
| 68 | + <Grid.RowDefinitions> |
| 69 | + <RowDefinition Height="Auto"/> |
| 70 | + <RowDefinition Height="Auto"/> |
| 71 | + </Grid.RowDefinitions> |
| 72 | + |
| 73 | + <ContentPresenter Content="{TemplateBinding Header}" |
| 74 | + ContentTemplate="{TemplateBinding HeaderTemplate}" |
| 75 | + Transitions="{TemplateBinding HeaderTransitions}" |
| 76 | + FontWeight="Normal" |
| 77 | + Foreground="{ThemeResource TextControlHeaderForeground}" |
| 78 | + Margin="{ThemeResource TextBoxTopHeaderMargin}" |
| 79 | + TextWrapping="Wrap" |
| 80 | + VerticalAlignment="Top" /> |
68 | 81 | <Border x:Name="BackgroundVisual" |
| 82 | + Grid.Row="1" |
69 | 83 | Background="{TemplateBinding Background}" |
70 | 84 | BorderBrush="{TemplateBinding BorderBrush}" |
71 | 85 | BorderThickness="{TemplateBinding BorderThickness}" /> |
72 | 86 |
|
73 | 87 | <Border x:Name="FocusVisual" |
| 88 | + Grid.Row="1" |
74 | 89 | Background="{ThemeResource SystemControlBackgroundAltHighBrush}" |
75 | 90 | BorderBrush="{ThemeResource TextControlBorderBrushFocused}" |
76 | 91 | BorderThickness="{TemplateBinding BorderThickness}" |
77 | 92 | Opacity="0" /> <!-- Background in WinUI is TextControlBackgroundFocused, but that uses a different resource in WinUI than system --> |
78 | 93 |
|
79 | 94 | <ScrollViewer x:Name="ScrollViewer" |
| 95 | + Grid.Row="1" |
80 | 96 | AutomationProperties.AccessibilityView="Raw" |
81 | 97 | BringIntoViewOnFocusChange="{TemplateBinding ScrollViewer.BringIntoViewOnFocusChange}" |
82 | 98 | HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" |
|
95 | 111 | Margin="{StaticResource TokenizingTextBoxPresenterMargin}" |
96 | 112 | Footer="{TemplateBinding Footer}" |
97 | 113 | FooterTemplate="{TemplateBinding FooterTemplate}" |
98 | | - FooterTransitions="{TemplateBinding FooterTransitions}" |
99 | | - Header="{TemplateBinding Header}" |
100 | | - HeaderTemplate="{TemplateBinding HeaderTemplate}" |
101 | | - HeaderTransitions="{TemplateBinding HeaderTransitions}" /> |
| 114 | + FooterTransitions="{TemplateBinding FooterTransitions}"/> |
102 | 115 | </ScrollViewer> |
103 | 116 |
|
104 | 117 | <VisualStateManager.VisualStateGroups> |
105 | 118 | <VisualStateGroup x:Name="CommonStates"> |
106 | 119 | <VisualState x:Name="Disabled"> |
107 | 120 | <Storyboard> |
108 | 121 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundVisual" |
109 | | - Storyboard.TargetProperty="Background"> |
| 122 | + Storyboard.TargetProperty="Background"> |
110 | 123 | <DiscreteObjectKeyFrame KeyTime="0" |
111 | | - Value="{ThemeResource TextControlBackgroundDisabled}" /> |
| 124 | + Value="{ThemeResource TextControlBackgroundDisabled}" /> |
112 | 125 | </ObjectAnimationUsingKeyFrames> |
113 | 126 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundVisual" |
114 | | - Storyboard.TargetProperty="BorderBrush"> |
| 127 | + Storyboard.TargetProperty="BorderBrush"> |
115 | 128 | <DiscreteObjectKeyFrame KeyTime="0" |
116 | | - Value="{ThemeResource TextControlBorderBrushDisabled}" /> |
| 129 | + Value="{ThemeResource TextControlBorderBrushDisabled}" /> |
117 | 130 | </ObjectAnimationUsingKeyFrames> |
118 | 131 |
|
119 | 132 | </Storyboard> |
|
122 | 135 | <VisualState x:Name="PointerOver"> |
123 | 136 | <Storyboard> |
124 | 137 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundVisual" |
125 | | - Storyboard.TargetProperty="BorderBrush"> |
| 138 | + Storyboard.TargetProperty="BorderBrush"> |
126 | 139 | <DiscreteObjectKeyFrame KeyTime="0" |
127 | | - Value="{ThemeResource TextControlBorderBrushPointerOver}" /> |
| 140 | + Value="{ThemeResource TextControlBorderBrushPointerOver}" /> |
128 | 141 | </ObjectAnimationUsingKeyFrames> |
129 | 142 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundVisual" |
130 | | - Storyboard.TargetProperty="Background"> |
| 143 | + Storyboard.TargetProperty="Background"> |
131 | 144 | <DiscreteObjectKeyFrame KeyTime="0" |
132 | | - Value="{ThemeResource TextControlBackgroundPointerOver}" /> |
| 145 | + Value="{ThemeResource TextControlBackgroundPointerOver}" /> |
133 | 146 | </ObjectAnimationUsingKeyFrames> |
134 | 147 | </Storyboard> |
135 | 148 | </VisualState> |
|
0 commit comments