|
33 | 33 | Width="{StaticResource OmnibarModeDefaultClickAreaWidth}" |
34 | 34 | Height="{TemplateBinding Height}" |
35 | 35 | Background="Transparent" |
36 | | - CornerRadius="{TemplateBinding CornerRadius}"> |
| 36 | + CornerRadius="{TemplateBinding CornerRadius}" |
| 37 | + ToolTipService.ToolTip="{Binding ToolTip, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"> |
37 | 38 | <Border.BackgroundTransition> |
38 | 39 | <BrushTransition Duration="0:0:0.083" /> |
39 | 40 | </Border.BackgroundTransition> |
|
42 | 43 | x:Name="PART_ModeIconPresenter" |
43 | 44 | HorizontalAlignment="Center" |
44 | 45 | VerticalAlignment="Center" |
45 | | - Content="{TemplateBinding IconOnInactive}" /> |
| 46 | + Content="{Binding IconOnInactive, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> |
46 | 47 | </Border> |
47 | 48 |
|
48 | 49 | <TextBox |
|
51 | 52 | HorizontalAlignment="Stretch" |
52 | 53 | HorizontalContentAlignment="Stretch" |
53 | 54 | PlaceholderText="{TemplateBinding TextPlaceholder}" |
54 | | - Text="{TemplateBinding Text}" |
| 55 | + Text="{Binding Path=Text, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" |
55 | 56 | Visibility="Collapsed"> |
56 | 57 | <TextBox.Resources> |
57 | 58 | <SolidColorBrush x:Key="TextControlBackground" Color="Transparent" /> |
|
70 | 71 |
|
71 | 72 | <VisualStateManager.VisualStateGroups> |
72 | 73 |
|
73 | | - <VisualStateGroup x:Name="CommonStates"> |
| 74 | + <VisualStateGroup x:Name="PointerStates"> |
74 | 75 | <VisualState x:Name="PointerNormal" /> |
75 | 76 | <VisualState x:Name="PointerOver"> |
76 | 77 | <VisualState.Setters> |
|
80 | 81 | <VisualState x:Name="PointerPressed"> |
81 | 82 | <VisualState.Setters> |
82 | 83 | <Setter Target="PART_ModeClickBorder.Background" Value="{ThemeResource SubtleFillColorSecondaryBrush}" /> |
83 | | - </VisualState.Setters> |
84 | | - </VisualState> |
85 | | - <VisualState x:Name="Focused"> |
86 | | - <VisualState.Setters> |
87 | | - <Setter Target="PART_ModeIconPresenter.Content" Value="{TemplateBinding IconOnActive}" /> |
| 84 | + <Setter Target="PART_ModeIconPresenter.Content" Value="{Binding IconOnActive, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> |
88 | 85 | </VisualState.Setters> |
89 | 86 | </VisualState> |
90 | 87 | </VisualStateGroup> |
|
98 | 95 | </VisualState> |
99 | 96 | </VisualStateGroup> |
100 | 97 |
|
| 98 | + <VisualStateGroup x:Name="IconStates"> |
| 99 | + <VisualState x:Name="InactiveIcon" /> |
| 100 | + <VisualState x:Name="ActiveIcon"> |
| 101 | + <VisualState.Setters> |
| 102 | + <Setter Target="PART_ModeIconPresenter.Content" Value="{Binding IconOnActive, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" /> |
| 103 | + </VisualState.Setters> |
| 104 | + </VisualState> |
| 105 | + </VisualStateGroup> |
| 106 | + |
101 | 107 | </VisualStateManager.VisualStateGroups> |
102 | 108 | </Grid> |
103 | 109 | </ControlTemplate> |
|
0 commit comments