Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6693647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:00:28+00:00 2026-05-26T06:00:28+00:00

Is there a best way to implement a control like this in WPF? I

  • 0

Is there a best way to implement a control like this in WPF?

Wizard Progress Control

I can easily replicate the text labels and the progress bar (without the circular “bumps” above each label) but I’d like to know if there’s a control already out there, or a best practice, for creating this sort of control in WPF.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:00:29+00:00Added an answer on May 26, 2026 at 6:00 am

    It’s hard to say what the best practice is in this case but here is how I would do it.

    The wizard control in your screenshot looks like a combination of a ProgressBar and an ItemsControl and in this case it seems easier to me to derive from ItemsControl and implement the progress functionality than the other way around but it also depends on how you want it to work (if you want a smooth progress or just light up the dots one-by-one for example).

    Using a UniformGrid as ItemsPanel and the ItemTemplate below, we get the following look (Steps is a List of strings)
    enter image description here

    <ItemsControl ItemsSource="{Binding Steps}">
        <ItemsControl.ItemsPanel>
            <ItemsPanelTemplate>
                <UniformGrid Rows="1"/>
            </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>
        <ItemsControl.ItemTemplate>
            <DataTemplate>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Ellipse HorizontalAlignment="Center" Height="20" Width="20" Stroke="Transparent" Fill="Blue"/>
                    <TextBlock Grid.Row="1" Text="{Binding}" HorizontalAlignment="Center" Margin="0,5,0,0"/>
                </Grid>
            </DataTemplate>
        </ItemsControl.ItemTemplate>
    </ItemsControl>
    

    Adding a DropShadowEffect to the ItemsPanel, two Path elements to the ItemTemplate and two DataTriggers to determine if the current item is the first or last item to show/hide the left/right Path and we can get a pretty similar look to your screenshot
    enter image description here

    ItemsPanel

    <UniformGrid Rows="1" SnapsToDevicePixels="True">
        <UniformGrid.Effect>
            <DropShadowEffect Color="Black"
                              BlurRadius="5"
                              Opacity="0.6"
                              ShadowDepth="0"/>
        </UniformGrid.Effect>
    </UniformGrid>
    

    ItemTemplate

    <DataTemplate>
        <DataTemplate.Resources>
            <Style TargetType="Path">
                <Setter Property="Data" Value="M0.0,0.0 L0.0,0.33 L1.0,0.33 L1.0,0.66 L0.0,0.66 L0.0,1.0"/>
                <Setter Property="StrokeThickness" Value="0"/>
                <Setter Property="Height" Value="21"/>
                <Setter Property="Stretch" Value="Fill"/>
                <Setter Property="Fill" Value="{StaticResource wizardBarBrush}"/>
                <Setter Property="StrokeEndLineCap" Value="Square"/>
                <Setter Property="StrokeStartLineCap" Value="Square"/>
                <Setter Property="Stroke" Value="Transparent"/>
            </Style>
        </DataTemplate.Resources>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Path Name="leftPath"/>
            <Path Name="rightPath" Grid.Column="1"/>
            <Ellipse Grid.ColumnSpan="2" HorizontalAlignment="Center" Height="20" Width="20" Stroke="Transparent" Fill="{StaticResource wizardBarBrush}"/>
            <TextBlock Grid.ColumnSpan="2" Grid.Row="1" Text="{Binding}" HorizontalAlignment="Center" Margin="0,5,0,0"/>
        </Grid>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource PreviousData}}"
                         Value="{x:Null}">
                <Setter TargetName="leftPath" Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Converter={markup:IsLastItemConverter}}"
                         Value="True">
                <Setter TargetName="rightPath" Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
        </DataTemplate.Triggers>
    </DataTemplate>
    

    If you decide to use this approach you can probably work out how to get the rest of it going, like

    • Implement this in a reusable custom control
    • Only get the stroke (DropShadowEffect) on the progress-part and not in the text
    • Implement the progress functionality etc.

    Anyway, I uploaded a sample project with a custom control called WizardProgressBar and a demo project using it here: https://www.dropbox.com/s/ng9vfi6uwn1peot/WizardProgressBarDemo2.zip?dl=0

    It looks like this
    enter image description here

    Things to note about the sample

    • I ended up in a situation where I would get the DropShadowEffect on the progress-part and the headers or get a thin line between each item (as seen in the picture). I can’t think of an easy way to get rid of it so maybe this isn’t the best approach after all 🙂
    • The progress-part is simple. It just has a value between 0-100 and then a converter decides if the item should be lit or not
    • This control might have a small performance impact but I can’t be sure since my computer seems to be running everything slow today…

    Update

    Made a few changes to the sample project where I split the presentation into two ItemsControls to get rid of the thin lines between each item. It now looks like this
    enter image description here
    Uploaded it here: https://www.dropbox.com/s/ng9vfi6uwn1peot/WizardProgressBarDemo2.zip?dl=0

    End of Update

    And here are the missing parts from the sample code above

    <LinearGradientBrush x:Key="wizardBarBrush" StartPoint="0.5,0.0" EndPoint="0.5,1.0">
        <GradientStop Color="#FFE4E4E4" Offset="0.25"/>
        <GradientStop Color="#FFededed" Offset="0.50"/>
        <GradientStop Color="#FFFCFCFC" Offset="0.75"/>
    </LinearGradientBrush>
    

    IsLastItemConverter

    public class IsLastItemConverter : MarkupExtension, IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            ContentPresenter contentPresenter = value as ContentPresenter;
            ItemsControl itemsControl = ItemsControl.ItemsControlFromItemContainer(contentPresenter);
            int index = itemsControl.ItemContainerGenerator.IndexFromContainer(contentPresenter);
            return (index == (itemsControl.Items.Count - 1));
        }
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotSupportedException();
        }
    
        public IsLastItemConverter() { }
        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            return this;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a standard/best way to space items in a WPF ListBox , such
I'm trying to choose the best way to implement this UI in MVVM manner.
What is the best way to implement a three item hashMap? For example, I
Is there a best way to turn an integer into its month name in
is there a best way to deploy to the GAC? is dragging the dll
Is there a best way to edit CSS? I'm looking for a designer tool.
is there any best practice way to replace a part of the default template.
I am wondering if there is a best way to shuffle a list of
Whenever I design a database, I always wonder if there is a best way
If there is truly a 'best' way, what is the best way to ship

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.