BackstageTabItem : Set IsEnabled / Visibility via Style
I am attempting to set the IsEnabled and Visibility of a BackstageTabItem in XAML
<syncfusion:BackstageTabItem Header="Publish">
<syncfusion:BackstageTabItem.Style>
<Style TargetType="syncfusion:BackstageTabItem">
<Setter Property="IsEnabled" Value="True"/>
<Setter Property="Visibility" Value="Visible"/>
</Style>
</syncfusion:BackstageTabItem.Style>
<publisher:PublisherDialog
Margin="0,40,0,0"
></publisher:PublisherDialog>
</syncfusion:BackstageTabItem>
If I attempt to use the above in-line styling, the BackstageTabItem never appears.
Ultimately I would like this BackstageTabItem to be driven from a <DataTrigger> inside the <Style>
Am I targetting the correct control?
Ultimately I would like this BackstageTabItem to be driven from a <DataTrigger> inside the <Style>
Am I targetting the correct control?
(If I remove the <syncfusion:BackstageTabItem.Style> XAML directive, the BackstageTabItem appears OK)
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
EM
Elakkiya Muthukumarasamy
Syncfusion Team
February 23, 2021 01:03 PM UTC
Hi Nick,
Thanks for contacting Syncfusion support.
We have checked your query “BackstageTabItem not appear while using style” and we found that when you are trying to apply the style directly to the BackstageTabItem the style will not be applied since its has support for only the ApplicationMenu items. But we can able to use style for BackstageTabItem based on the Theme applied which is applied in the project. Please refer the below sample and code snippet for the same.
Code Snippet:
|
<syncfusion:BackstageTabItem Header="Publish">
<syncfusion:BackstageTabItem.Style>
<Style BasedOn="{StaticResource SyncfusionBackstageTabItemStyle}" TargetType="syncfusion:BackstageTabItem">
<Setter Property="IsEnabled" Value="True"/>
<Setter Property="Visibility" Value="Visible"/>
</Style>
</syncfusion:BackstageTabItem.Style>
</syncfusion:BackstageTabItem> |
Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/RibbonSample_Modified-600022289
Output:
Please try it with the provided solution and let us know if you need any further assistance on this. We will be glad to assist you.
Regards,
Elakkiya
Marked as answer
NH
Nick Hodge
February 24, 2021 01:29 AM UTC
Thank you, this is working perfectly.
EM
Elakkiya Muthukumarasamy
Syncfusion Team
February 24, 2021 05:08 AM UTC
Hi Nick,
Thanks for the update. We are glad to know that the issue is resolved at your end. Also, please let us know if you require any further assistance on this. As always, we will be happy to assist you.
Regards,
Elakkiya
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
- Marked answer
-
NH Nick Hodge
- Feb 22, 2021 10:16 PM UTC
- Feb 24, 2021 05:08 AM UTC