We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Unable to use Icon Only

Thread ID:

Created:

Updated:

Platform:

Replies:

132715 Sep 17,2017 07:28 PM Sep 22,2017 07:34 AM UWP 8
loading
Tags: SfTabControl
damon
Asked On September 17, 2017 07:28 PM

Hi.  We LOVE these controls.  Issue I am having is two.
1.  With ShowIcon="True"  I get an object reference not set to an instance of an object error.
2.  If I don't have at least a space Header=" " for SfTabItem, I get a fatal crash.

How can I show ONLY the Icon?  

<navigation:SfTabControl ShowIcon="True" x:Name="TabControl" SelectedIndex="0"
                             DisplayMemberPath="Name"
                             TabScrollButtonVisibility="Collapsed"
                             TabStripPlacement="Left">

                <navigation:SfTabItem x:Name="SkyPlotTab"
                              Header=" "
                              VerticalAlignment="Center" 
                               x:FieldModifier="public">
                    <navigation:SfTabItem.Icon>
                        <Image Source="\Assets\nav_icons\SatelliteOn512.fw.png" Width="25" Height="25"></Image>
                    </navigation:SfTabItem.Icon>


Marimuthu Sivalingam [Syncfusion]
Replied On September 18, 2017 08:12 AM

Hi Damon,

We were able to reproduce the issue and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents  

Regards,
Marimuthu S.

damon
Replied On September 18, 2017 09:54 AM

My biggest issue is that I need to only show the ICON. I got past having to have at least one letter in HEADER, but, that now shows 'Untitled'.  
I really need to only show an ICON for the header, No Text.


Subashini Mahendran [Syncfusion]
Replied On September 19, 2017 07:11 AM

Hi Damon,

We have checked your query "Need to show only an ICON for the header, not Text in SfTabControl". In SfTabControl, Default value of Header is "Untitled". So, it will show Untitled as Header if we are not setting Header for SfTabItem. We can achieve your requirement by setting Header value as "Empty" or "Null" for SfTabItem to show only icon. We have also prepared the sample based on your requirement. Please download the sample for the same from the below link.

Sample: SfTabControl_Sample

But we are facing some issue like displaying the Content value as Header when setting Header as "Empty" or "Null" and Content for SfTabItem. Could you please confirm us whether this one is your reported issue. If not please update us the screenshot of your issue or issue reproducible sample with Syncfusion Version. This would help us to proceed further.

Regards,
Subashini M.

damon
Replied On September 19, 2017 12:49 PM

This is interesting.  Using your example I still get the "Object Reference not set to an instance of an object: for the 'Show Icon = 'true' :

When I run your example it works.
When I try to use the null it throws an exception and crashes the program.

So, not sure what is happening.  


damon
Replied On September 19, 2017 01:35 PM

I was able to finally get it to work with the following:

<navigation:SfTabControl x:Name="TabControl" SelectedIndex="0"

                             ShowIcon="True" 

                             TabScrollButtonVisibility="Collapsed"

                             TabStripPlacement="Left">


                <navigation:SfTabItem x:Name="SkyPlotTab"

                              VerticalAlignment="Center" 

                              Header=" " x:FieldModifier="public">

                    <navigation:SfTabItem.Icon>

                        <Image Source="Assets\NavIcons\SatelliteOn512.fw.png" Height="25" Width="25"></Image>

                    </navigation:SfTabItem.Icon>

If I used Header="{x:Null}" it crashed.  while instead, using a space it works.

Also I had to remove Displaymember.



Subashini Mahendran [Syncfusion]
Replied On September 20, 2017 08:21 AM

Hi Damon,

Query 1 : Using your example I still get the "Object Reference not set to an instance of an object error" when I set Show Icon = "True".

As promised earlier we will provide you the patch on incident which created to follow up this issue.

Query 2: I used Header="{x:Null}" it crashed.

We have checked the reported crash with our side but we are unable to reproduce the reported crash from our end. This reported crash may reproduced based on Windows SDK Version used in application. So, could you please share us the following information. It would be more helpful to proceed further.
1. Windows SDK Version.
2. Essential Studio Version.
3. OS Version.

Regards,
Subashini M.

damon
Replied On September 20, 2017 08:46 AM

Windows SDK Version.    --  .NET Framework 4.7.02046

Essential Studio Version.  I am using Visual Studios Enterprise: 15.3.3

OS Version.     Windows 10 Pro: 10.0.15063 Build 15063

SyncFusion COntrols for UWP XAML: 15.3.0.26

Target Version for Application is: Windows 10 Creators Update (10.0; Build 15063)

Being Deployed to Windows 10 IoT Platform. 

Subashini Mahendran [Syncfusion]
Replied On September 22, 2017 07:34 AM

Hi Damon,  

We have checked the reported issue "Application Crashed while setting Header value as "Null" for SfTabItem. We have tried in different machines which contains same SDK, OS Version and Essential Studio Version which you have used, but we were unable to reproduce the reported crash. We have also deployed to Windows IoT platform, but we were unable to reproduce issue. Can you please update us the last updated sample run without crash while setting Null header. If yes please check by change the Target Version of your Application. We suspect that the crash raised based on the Target Version of our Application.  

Please log on to our support website to check for further updates regarding the “Object Reference not set to an instance of an object error" Query on incident which created to follow up this issue.  

Regards,
Subashini M. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;