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 Range or Pointer due to missing assembly or namespace

Thread ID:

Created:

Updated:

Platform:

Replies:

128272 Jan 11,2017 11:57 AM Jan 12,2017 04:04 AM Xamarin.Forms 2
loading
Tags: SfLinearGauge
Mark Curtis
Asked On January 11, 2017 11:57 AM

When following the Xamarin.Forms SfLinearGauge documentation, I'm trying to add Ranges or a SymbolPointer to my gauge but I keep getting a compilation error:

Type sf:LinearScale.Ranges not found in xmlns clr-namespace:Syncfusion.SfGauge.XForms;assembly=Syncfusion.SfGauge.XForms
or
Type sf:LinearScale.Pointers not found in xmlns clr-namespace:Syncfusion.SfGauge.XForms;assembly=Syncfusion.SfGauge.XForms

Here is my namespace declaration:

             xmlns:sf="clr-namespace:Syncfusion.SfGauge.XForms;assembly=Syncfusion.SfGauge.XForms"

What is wrong?  I'm using version 14.4.0.15.



Mark Curtis
Replied On January 11, 2017 12:07 PM

I figured it out.  Make sure you have both Scales and a Scale within the collection.  I was doing this which is wrong:

                      <sf:SfLinearGauge Grid.Column="4" Margin="10,1,0,1" HorizontalOptions="CenterAndExpand" VerticalOptions="Center" Orientation="OrientationHorizontal" FrameBackgroundColor="Black">
                        <sf:SfLinearGauge.Scales MinimumValue="0" MaximumValue="100" ScaleBarLength="70" ShowRim="true" ShowLabels="false" ScaleBarColor="White" ScaleBarSize="12">
                            <sf:LinearScale.Ranges>
                              <sf:LinearRange x:Name="lowUsed" StartValue="0" Color="Green" EndValue="33" StartWidth="8" EndWidth="8" />
                              <sf:LinearRange x:Name="medUsed" StartValue="34" Color="Yellow" EndValue="67" StartWidth="8" EndWidth="8" />
                              <sf:LinearRange x:Name="highUsed" StartValue="68" Color="Red" EndValue="100" StartWidth="8" EndWidth="8" />
                            </sf:LinearScale.Ranges>
                            <sf:LinearScale.Pointers>
                              <sf:SymbolPointer x:Name="symbolPointer" Value="{Binding memoryUsed}" Offset="0.0" Thickness="3" Color="Black"/>
                            </sf:LinearScale.Pointers>
                        </sf:SfLinearGauge.Scales>
                      </sf:SfLinearGauge>


This is what I should have done:

                      <sf:SfLinearGauge Grid.Column="4" Margin="10,1,0,1" HorizontalOptions="CenterAndExpand" VerticalOptions="Center" Orientation="OrientationHorizontal" FrameBackgroundColor="Black">
                        <sf:SfLinearGauge.Scales>
                          <sf:LinearScale MinimumValue="0" MaximumValue="100" ScaleBarLength="70" ShowRim="true" ShowLabels="false" ScaleBarColor="White" ScaleBarSize="12">
                            <sf:LinearScale.Ranges>
                              <sf:LinearRange x:Name="lowUsed" StartValue="0" Color="Green" EndValue="33" StartWidth="8" EndWidth="8" />
                              <sf:LinearRange x:Name="medUsed" StartValue="34" Color="Yellow" EndValue="67" StartWidth="8" EndWidth="8" />
                              <sf:LinearRange x:Name="highUsed" StartValue="68" Color="Red" EndValue="100" StartWidth="8" EndWidth="8" />
                            </sf:LinearScale.Ranges>
                            <sf:LinearScale.Pointers>
                              <sf:SymbolPointer x:Name="symbolPointer" Value="{Binding memoryUsed}" Offset="0.0" Thickness="3" Color="Black"/>
                            </sf:LinearScale.Pointers>
                          </sf:LinearScale>
                        </sf:SfLinearGauge.Scales>
                      </sf:SfLinearGauge>



Vanaja  Annasamy [Syncfusion]
Replied On January 12, 2017 04:04 AM

Hi Mark,

Thank you for contacting Syncfusion support. ​​​

Query:SfLinearGauge with Symbol and Range pointer

We have prepared a sample using SfLineargauge as per your requirement. Please download the same from the below available link.

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/general/LINEAR~11527379873.ZIP 

Please let us know if you have any concern on this.

Regards,
Vanaja R.A. 


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.

;