Skip to content

Commit aa72252

Browse files
committed
Fix a binding error in HeaderStyle's Width
1 parent 782d24e commit aa72252

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

IPConfig/Views/NicConfigDetailView.xaml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@
4545
</ContextMenu>
4646
</Setter.Value>
4747
</Setter>
48+
</Style>
4849

50+
<Style x:Key="ExpanderHeaderStyle"
51+
BasedOn="{StaticResource HeaderStyle}"
52+
TargetType="{x:Type TextBlock}">
4953
<Setter Property="Width" Value="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type Expander}}}" />
5054
</Style>
5155

@@ -146,7 +150,7 @@
146150
<hc:UniformSpacingPanel>
147151
<Expander IsExpanded="True">
148152
<Expander.Header>
149-
<TextBlock Style="{StaticResource HeaderStyle}"
153+
<TextBlock Style="{StaticResource ExpanderHeaderStyle}"
150154
Text="{lang:Lang {x:Static lang:LangKey.AdapterProperties_Header}}" />
151155
</Expander.Header>
152156

@@ -200,7 +204,7 @@
200204

201205
<Expander IsExpanded="{Binding Nic.SupportsIPv4, Mode=OneWay}">
202206
<Expander.Header>
203-
<TextBlock Style="{StaticResource HeaderStyle}"
207+
<TextBlock Style="{StaticResource ExpanderHeaderStyle}"
204208
Text="{lang:Lang {x:Static lang:LangKey.IPv4GeneralProperties_Header}}" />
205209
</Expander.Header>
206210

@@ -239,7 +243,7 @@
239243

240244
<Expander IsExpanded="{Binding Nic.SupportsIPv4, Mode=OneWay}">
241245
<Expander.Header>
242-
<TextBlock Style="{StaticResource HeaderStyle}"
246+
<TextBlock Style="{StaticResource ExpanderHeaderStyle}"
243247
Text="{lang:Lang {x:Static lang:LangKey.IPv4Lifetimes_Header}}" />
244248
</Expander.Header>
245249

@@ -266,7 +270,7 @@
266270

267271
<Expander IsExpanded="{Binding Nic.SupportsIPv4, Mode=OneWay}">
268272
<Expander.Header>
269-
<TextBlock Style="{StaticResource HeaderStyle}"
273+
<TextBlock Style="{StaticResource ExpanderHeaderStyle}"
270274
Text="{lang:Lang {x:Static lang:LangKey.IPv4AdvancedProperties_Header}}" />
271275
</Expander.Header>
272276

@@ -317,7 +321,7 @@
317321

318322
<Expander IsExpanded="{Binding Nic.SupportsIPv4, Mode=OneWay}">
319323
<Expander.Header>
320-
<TextBlock Style="{StaticResource HeaderStyle}"
324+
<TextBlock Style="{StaticResource ExpanderHeaderStyle}"
321325
Text="{lang:Lang {x:Static lang:LangKey.IPv4Statistics_Header}}" />
322326
</Expander.Header>
323327

@@ -403,7 +407,7 @@
403407

404408
<Expander IsExpanded="{Binding Nic.SupportsIPv6, Mode=OneWay}">
405409
<Expander.Header>
406-
<TextBlock Style="{StaticResource HeaderStyle}"
410+
<TextBlock Style="{StaticResource ExpanderHeaderStyle}"
407411
Text="{lang:Lang {x:Static lang:LangKey.IPv6GeneralProperties_Header}}" />
408412
</Expander.Header>
409413

@@ -448,7 +452,7 @@
448452

449453
<Expander IsExpanded="{Binding Nic.SupportsIPv6, Mode=OneWay}">
450454
<Expander.Header>
451-
<TextBlock Style="{StaticResource HeaderStyle}"
455+
<TextBlock Style="{StaticResource ExpanderHeaderStyle}"
452456
Text="{lang:Lang {x:Static lang:LangKey.IPv6Lifetimes_Header}}" />
453457
</Expander.Header>
454458

@@ -475,7 +479,7 @@
475479

476480
<Expander IsExpanded="{Binding Nic.SupportsIPv6, Mode=OneWay}">
477481
<Expander.Header>
478-
<TextBlock Style="{StaticResource HeaderStyle}"
482+
<TextBlock Style="{StaticResource ExpanderHeaderStyle}"
479483
Text="{lang:Lang {x:Static lang:LangKey.IPv6AdvancedProperties_Header}}" />
480484
</Expander.Header>
481485

0 commit comments

Comments
 (0)