Introduction

Most of the times developers are in search of guages through which they can represent their information, that might be number if tweets, number of clicks or anything they like to present. Making own guage becom more hactic and is very time taking. I have included .dll  that can be used for guage control in your Windows Phone 8 application. This .dll file has been made after collecting code snippets and at the end you have the .dll and you can use it as you want.

Building the Sample

For building the sample you have to follow few steps befor you digg into the code.

  1. Download the .dll file attached with documentation.
  2. Add the.dll file into your project by going to references and adding a new reference.
  3. After adding it click on ok.

As you have done the initial step so now you can follow following steps.

Description

As discussed earlier, building guages is really difficult for the developer and it takes a lot of time. Use of guages is really common now a days for presenting information in a good manner. That might be number of clickes, that might be the number of tweets or any type of information you need to present. 

 

Add the reference of .dll file in XAML code and add your guage in grid so it is visible at your page. In this code there is a slider that is binded to the guage.

XAML
 <Grid x:Name="LayoutRoot" 
          Background="Transparent"        <Grid.RowDefinitions            <RowDefinition Height="Auto" /> 
            <RowDefinition Height="*" /> 
        </Grid.RowDefinitions> 
 
        <!--TitlePanel contains the name of the application and page title--> 
        <StackPanel x:Name="TitlePanel" 
                    Grid.Row="0" 
                    Margin="12,17,0,28"            <TextBlock Text="myControl" 
                       Style="{StaticResource PhoneTextNormalStyle}" 
                       Margin="12,0" /> 
            <TextBlock Text="GAUGE" 
                       Margin="9,-7,0,0" 
                       Style="{StaticResource PhoneTextTitle1Style}" /> 
        </StackPanel> 
 
        <!--ContentPanel - place additional content here--> 
        <Grid x:Name="ContentPanel" 
              Grid.Row="1" 
              Margin="12 0"          
            <controls:Gauge Value="{Binding Value, ElementName=TheSlider}" 
                            Unit="Tricks" 
                            Margin="0,0,10,55" NeedleBrush="{x:Null}" TickBrush="{x:Null}" ScaleBrush="#66FFE800" Opacity="0.6" Grid.ColumnSpan="2" Grid.RowSpan="2" TrailBrush="#FFFFE908" /> 
 
 
            <Slider x:Name="TheSlider" 
                    Minimum="0" 
                    Maximum="100" 
                    Value="30" Margin="0,504,0,0" /> 
        </Grid> 

                  


 SampleCode

See Also

Another important place to find a huge amount of Windows Phone related articles is the TechNet Wiki itself. The best entry point is Windows Phone Resources on the TechNet Wiki.