Help on guage XML NameSpace

Gauge for WPF Forum

Posted 13 years ago by SHKODRA
Avatar
Hello to all.
I created a wpf gauge example, in visual studio I see it as they should, but when I try to get by iexplore , I receive this message:
System.Windows.Markup.XamlParseException: The tag 'CircularGauge' does not exist in XML namespace 'http://schemas.actiprosoftware.com/winfx/xaml/gauge'. Line '50' Position '22'.
Xaml code:
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:gauge="http://schemas.actiprosoftware.com/winfx/xaml/gauge"
             xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
             xmlns:system="clr-namespace:System;assembly=mscorlib"
             xmlns:themes="http://schemas.actiprosoftware.com/winfx/xaml/themes"             Background="#F8F8F8"
             mc:Ignorable="d" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="400" Width="251">

    <UserControl.Resources>

        <!-- Data Providers -->
        <ObjectDataProvider x:Key="backgroundTypeObjectDataProvider" MethodName="GetValues" ObjectType="{x:Type system:Enum}">
            <ObjectDataProvider.MethodParameters>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
        <ObjectDataProvider x:Key="glassTypeObjectDataProvider" MethodName="GetValues" ObjectType="{x:Type system:Enum}">
            <ObjectDataProvider.MethodParameters>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
        <ObjectDataProvider x:Key="rimTypeObjectDataProvider" MethodName="GetValues" ObjectType="{x:Type system:Enum}">
            <ObjectDataProvider.MethodParameters>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>

        <!-- Converters -->


    </UserControl.Resources>

    <Grid Margin="10" Width="570">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="10" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="10" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <ScrollViewer Grid.Row="4" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="0,0,338,43">
            <StackPanel Orientation="Horizontal" Height="306" Width="221">

                <StackPanel>

                    <!-- CirularGauge -->
                   
                    <gauge:CircularGauge x:Name="gauge" Width="220" Height="220" Radius="110" HorizontalAlignment="Left"
                            Background="#FF5D1E1E" RimBrush="#FF363065" FrameType="CircularThickRimEclipse">
                        <gauge:CircularGauge.BackgroundGeometry>
                            <Geometry>M 1,0 L 2,0 L 3,1 L 3,2 L 2,3 L 1,3 L 0,2 L 0,1 Z</Geometry>
                        </gauge:CircularGauge.BackgroundGeometry>
                        <gauge:CircularGauge.RimGeometry>
                            <Geometry>M 1,0 L 2,0 L 3,1 L 3,2 L 2,3 L 1,3 L 0,2 L 0,1 Z</Geometry>
                        </gauge:CircularGauge.RimGeometry>

                        <gauge:CircularGauge.LayoutTransform>
                            <ScaleTransform ScaleX="{Binding ElementName=scaleSlider, Path=Value}"
                                    ScaleY="{Binding ElementName=scaleSlider, Path=Value}" />
                        </gauge:CircularGauge.LayoutTransform>

                        <gauge:CircularGauge.Items>
                            <TextBlock x:Name="textBlock" gauge:CircularGauge.Y="-30" Text="sacmi" FontFamily="Script MT"
                                    Foreground="WhiteSmoke" FontSize="19" />
                        </gauge:CircularGauge.Items>

                        <gauge:CircularGauge.Scales>
                            <gauge:CircularScale Radius="74" StartAngle="170" SweepAngle="200"
                                    Background="{shared:LinearGradientBrush DarkGray, Gray, GradientType=TopToBottom}">
                                <gauge:CircularScale.TickSets>
                                    <gauge:CircularTickSet MajorInterval="10" MinorInterval="2" gauge:CircularScale.SweepAngle="360" Maximum="360" gauge:CircularGaugeBase.Radius="75px" gauge:CircularScale.StartAngle="270" IsManipulationEnabled="True" LogarithmicBase="10" gauge:ScaleBase.BarExtent="4px" IsLogarithmic="False" AllowDrop="False">
                                        <gauge:CircularTickSet.ContextMenu>
                                            <ContextMenu />
                                        </gauge:CircularTickSet.ContextMenu>
                                        <gauge:CircularTickSet.Ticks>
                                            <gauge:CircularTickMarkMinor TickMarkAscent="3" ScalePlacement="Outside" ScaleOffset="1"
                                                    Background="{shared:LinearGradientBrush Black, DarkGray, GradientType=TopToBottom}" />
                                            <gauge:CircularTickMarkMajor ScalePlacement="Outside" ScaleOffset="1"
                                                    Background="{shared:LinearGradientBrush Black, DarkGray, GradientType=TopToBottom}" />
                                            <gauge:CircularTickLabelMajor FontFamily="Tahoma" TextOrientation="Rotated" ScalePlacement="Inside" Focusable="True" Foreground="#FFFFDEDE" MinorInterval="0" MajorInterval="1" StartValue="NaN" EndValue="NaN" gauge:TickSetBase.MajorInterval="1" gauge:TickSetBase.Maximum="15" gauge:TickSetBase.MinorInterval="1" gauge:TickSetBase.Minimum="0" gauge:TickSetBase.MinorIntervalType="Auto" gauge:TickSetBase.IsReversed="False" gauge:TickSetBase.IsLogarithmic="False" IsManipulationEnabled="True" HasDropShadow="True" OpacityMask="{x:Null}" DataContext="{Binding}" MinimumTickVisibility="Always" Angle="0" gauge:CircularGaugeBase.Radius="102px" FontWeight="Bold" gauge:GaugeBase.X="0px" MaximumTickVisibility="Always" gauge:ScaleBase.BarExtent="4px" MinorIntervalType="Auto" gauge:TickSetBase.MajorIntervalType="Linear" IntervalOrigin="Zero" MajorIntervalType="Auto" OverridesDefaultStyle="False"></gauge:CircularTickLabelMajor>
                                        </gauge:CircularTickSet.Ticks>
                                        <gauge:CircularTickSet.Pointers>
                                            <gauge:CircularPointerNeedle
                                                    Background="{shared:LinearGradientBrush #FFEF153F, #FFEB7A8A, GradientType=LeftToRight, AdditionalStopCount=1}"
                                                    NeedleType="PivotSwordSharp"  PointerExtent="78" PointerAscent="10" />
                                        </gauge:CircularTickSet.Pointers>
                                    </gauge:CircularTickSet>
                                </gauge:CircularScale.TickSets>
                            </gauge:CircularScale>
                        </gauge:CircularGauge.Scales>

                    </gauge:CircularGauge>

                    <!-- Standard Options -->
                    <Grid Margin="0,10,0,0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="3" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" MinWidth="100" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <TextBlock Margin="0,0,7,0" Text="Value" HorizontalAlignment="Right" VerticalAlignment="Center" />
                        <Slider x:Name="valueSlider" Grid.Column="1" Minimum="0" Maximum="100" LargeChange="10" SmallChange="1"    
                                Value="{Binding ElementName=gauge, Path=Scales[0].TickSets[0].Pointers[0].Value, Mode=TwoWay}"
                                IsMoveToPointEnabled="True" IsSnapToTickEnabled="True" TickFrequency="1" HorizontalAlignment="Left" Width="100" />
                        <TextBlock Grid.Column="2" Margin="3,0,0,0" Text="{Binding ElementName=valueSlider, Path=Value}"
                                HorizontalAlignment="Left" VerticalAlignment="Center" />

                        <TextBlock Grid.Row="2" Margin="0,0,7,0" Text="Scale" HorizontalAlignment="Right" VerticalAlignment="Center" />
                        <Slider x:Name="scaleSlider" Grid.Row="2" Grid.Column="1" Minimum="1" Maximum="3" LargeChange="0.5"
                                SmallChange="0.1" Value="1" IsSnapToTickEnabled="True" TickFrequency="0.1" />
                        <TextBlock Grid.Row="2" Grid.Column="2" Margin="3,0,0,0"
                                Text="{Binding ElementName=scaleSlider, Path=Value, Converter={StaticResource PercentageConverter}, ConverterParameter=%}"
                                HorizontalAlignment="Left" VerticalAlignment="Center" />

                    </Grid>
                </StackPanel>

                <StackPanel Margin="25,0,0,0" Grid.IsSharedSizeScope="True">

                    <!-- Frame Options -->
                    <!-- TextBlock Options -->
                </StackPanel>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</UserControl>
Can anybody tell me where I went wrong?
Thanks.

[Modified at 02/13/2011 12:12 PM]

Comments (6)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

Chances are that you did not properly deploy the Gauge assembly or it cannot be found/loaded. If this does not help, please email a small sample project that reproduces the issue to our support address and we can take a closer look.


Actipro Software Support

Posted 13 years ago by SHKODRA
Avatar
Thanks for reply and support.
I have reviewed the project again, but I do not results that can be such a thing.
In any case, I sent you the project in question, so you can see more closely where I went wrong.
Thanks again for your time.
Posted 13 years ago by SHKODRA
Avatar
Repaired the mistakes made previously,
now I get this other error, can you tell me why it happens?
When I write the code in axml, the class is present ,visual studio do not get any error.
 'Class' attribute does not exist in XML namespace 
' http://schemas.microsoft.com/winfx/2006/xaml 'namespace Line '8' position '2 ' ' 
thanks.
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Marco,

We responded to your ticket. Keep in mind that we monitor both forum posts and tickets with the same diligence, so there is no need to post the same question to both locations.


Actipro Software Support

Posted 13 years ago by SHKODRA
Avatar
Sorry for inconvenience, I read the mail only after posting in the forum.
I will pay more attention next time.
Then something so we can be more clear in explaining things.
If I use any part of the package "Actipro" in a WPF application everything works perfectly, but if I are the same components used in a UserControl nothing works.
At this point I do not think that is a problem with the package Actipro or several links, but Visual Studio would say that is the problem .
Is there any way to fix this?
Incredible us in 2011 and Microsoft still does not have a working development environment.
The 10 years that I use Pascal and Delphi have never seen such a story,shame.
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

Based on your error message above, it looks like you have spaces (or extra non-printable characters) in your xmlns definition. If you using something like:
<Window x:Class="..."
    xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml " ...>
Notice the extra spaces in between the quotes. With this, you will get the error you are seeing. There cannot be any extra spaces or characters in the string, so it must be like:
<Window x:Class="..."
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ...>


Actipro Software Support

The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.