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?

(If I remove the <syncfusion:BackstageTabItem.Style> XAML directive, the BackstageTabItem appears OK)

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> 
 
 
 
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 


Loader.
Up arrow icon