I want to disable a Pivot
item's header according to the conditions.
<Pivot>
<Pivot.Resources>
<Style TargetType="PivotHeaderItem">
<Setter Property="IsEnabled" Value="false"/>
</Style>
</Pivot.Resources>
<PivotItem Header="Header1" IsEnabled = false>
<!-- Something Content -->
</PivotItem>
<PivotItem Header="Header2">
<!-- Something Content -->
</PivotItem>
<PivotItem Header="Header3">
<!-- Something Content -->
</PivotItem>
</Pivot>
<PivotItem IsEnabled = false>
- When I did this, the header and content of this PivotItem was disabled.
<Style TargetType="PivotHeaderItem"><Setter Property="IsEnabled" Value="true"/></Style>
- When I did this, all the headers were disabled.
I thought I should find the PivotHeaderItem
in the Pivot and set isEnabled
to false, but I can't find it.
What should I do?
PivotItem
by settingIsEnabled = false
. Could you maybe share a bit more of your code? – LeanderPivotItem
from thePivot
when I wanted to disable it. What I also know is that thePivotHeader
does not have anIsEnabled
property. Could you maybe explain why you would only want to disable the header while keeping the content of thePivotItem
enabled? – Leander