Gauge for WPF
BulletGraph クイックスタート
クイックスタート > BulletGraph クイックスタート

The following quick start guide is intended to get you up and running with BulletGraph for WPF. You will begin in Visual Studio, create a new project, add a BulletGraph to your application, and add the gauge value.

The following image depicts a BulletGraph that displays the value property set at 50.

Set up the Application

To set up your project and add the BulletGraph control to your application, complete the following steps:    

  1. Create a new WPF Application project in Visual Studio.
  2. Right-click your project in the Solution Explorer and select Manage Nuget Packages option.
  3. Install the latest version of C1.WPF.Gauge package.
  4. The C1.WPF.Gauge package installs the following DLLs:
    • C1.WPF.Gauge
    • C1.WPF.Core
    • C1.WPF.DX
    • C1.WPF.Rendering
  5. Add the Control. Navigate to the Toolbox and drag and drop the BulletGraph control on the XAML designer. When the BulletGraph control is dropped on the form, it displays a default pointer value of 25, along with Good, Bad and Target values as 50, 80 and 70, respectively.

Set Gauge Values

Set the Value property of BulletGraph to 50. Also, set the BadGoodTarget and TextVisbility properties to customize the gauge control.

<c1:C1BulletGraph Name="bulletGraph" Bad="60" Good="80" TextVisibility="All" Value="50" Target="75" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="224,162,0,0" Width="393"/>
bulletGraph.Value = 50;
bulletGraph.Bad = 60;
bulletGraph.Good = 80;
bulletGraph.Target = 75;
bulletGraph.TextVisibility = C1.WPF.Gauge.GaugeTextVisibility.All;

For more information about Value, see Values and BulletGraph features.

Run Application

Build and run to view the final BulletGraph application.