|
126 | 126 | <controls:Node x:Name="Node" |
127 | 127 | IsResize="True" |
128 | 128 | Input="{Binding Input}" |
129 | | - Header="{Binding Title}" |
| 129 | + |
130 | 130 | Location="{Binding Location,Mode=TwoWay}" |
131 | 131 | VerticalAlignment="Center" |
132 | 132 | Output="{Binding Output}"> |
| 133 | + <controls:Node.Styles> |
| 134 | + <Style Selector="controls|Node /template/ ContentPresenter#HeaderContentPresenter"> |
| 135 | + <Setter Property="HorizontalAlignment" Value="Stretch"></Setter> |
| 136 | + </Style> |
| 137 | + </controls:Node.Styles> |
| 138 | + <controls:Node.Header> |
| 139 | + <Grid HorizontalAlignment="Stretch"> |
| 140 | + <Grid.ColumnDefinitions> |
| 141 | + <ColumnDefinition Width="*" /> |
| 142 | + <ColumnDefinition Width="*" /> |
| 143 | + </Grid.ColumnDefinitions> |
| 144 | + <TextBlock Grid.Column="0" VerticalAlignment="Center" Text="Left Content" /> |
| 145 | + <TextBlock Grid.Column="1" VerticalAlignment="Center" Text="{Binding Title}" /> |
| 146 | + </Grid> |
| 147 | + </controls:Node.Header> |
133 | 148 | <controls:Node.Styles> |
134 | 149 | <Style Selector="controls|Node[IsSelected=False]:pointerover"> |
135 | 150 | <Setter Property="BorderBrush" Value="AliceBlue"></Setter> |
|
142 | 157 | VerticalAlignment="Center" |
143 | 158 | IsConnected="{Binding IsConnected}" |
144 | 159 | Anchor="{Binding Anchor, Mode=OneWayToSource}"> |
145 | | - <controls:NodeInput.Header> |
146 | | - <StackPanel Orientation="Horizontal" VerticalAlignment="Center" |
147 | | - HorizontalAlignment="Right"> |
148 | | - |
149 | | - <TextBlock VerticalAlignment="Center" x:Name="textBlock" |
150 | | - Text="{Binding Title}" /> |
151 | | - </StackPanel> |
152 | | - </controls:NodeInput.Header> |
| 160 | + |
153 | 161 | <controls:NodeInput.BorderBrush> |
154 | 162 | <SolidColorBrush |
155 | 163 | Color="CornflowerBlue" |
|
167 | 175 | IsConnected="{Binding IsConnected}" |
168 | 176 | Anchor="{Binding Anchor, Mode=OneWayToSource}"> |
169 | 177 | <controls:NodeOutput.Header> |
170 | | - <StackPanel Orientation="Horizontal" VerticalAlignment="Center" |
171 | | - HorizontalAlignment="Right"> |
172 | | - |
173 | | - <TextBlock VerticalAlignment="Center" x:Name="textBlock" |
174 | | - Text="{Binding Title}" /> |
175 | | - </StackPanel> |
| 178 | + <Grid> |
| 179 | + <Grid.ColumnDefinitions> |
| 180 | + <ColumnDefinition Width="*" /> |
| 181 | + <ColumnDefinition Width="*" /> |
| 182 | + </Grid.ColumnDefinitions> |
| 183 | + <TextBlock Grid.Column="0" VerticalAlignment="Center" Text="Left Content" /> |
| 184 | + <TextBlock Grid.Column="1" VerticalAlignment="Center" Text="{Binding Title}" /> |
| 185 | + </Grid> |
176 | 186 | </controls:NodeOutput.Header> |
177 | 187 | <controls:NodeOutput.BorderBrush> |
178 | 188 | <SolidColorBrush |
|
0 commit comments