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 6727861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:06:02+00:00 2026-05-26T10:06:02+00:00

I am doing an application for energy flow. I would like to show energy

  • 0

I am doing an application for energy flow. I would like to show energy flowing using progress bars. I would need to turn the progress bars at some point and still flow continously. Is there a way to turn a point on the progress bar by 90 degrees? For example an L shape.

Any idea how to go about it?

  • 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-26T10:06:02+00:00Added an answer on May 26, 2026 at 10:06 am

    Ok, i finished it. so edit this page. i guess this is you need.

    Create a New WPF Project and edit it.

    Xaml code MainWindow.xaml:

    <Window x:Class="WpfApplication1.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:my="clr-namespace:WpfApplication1"
            Title="MainWindow" Height="350" Width="525">
        <Window.Resources>
            <my:PointConverter x:Key="PointConverter" />
            <Storyboard x:Key="Storyboard1" RepeatBehavior="Forever">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(RangeBase.Value)" Storyboard.TargetName="progress">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:2" Value="100"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </Window.Resources>
        <Window.Triggers>
            <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                <BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
            </EventTrigger>
        </Window.Triggers>
        <Grid>
            <ProgressBar Name="progress" Width="200" Height="200" Value="100">
                <ProgressBar.Template>
                    <ControlTemplate TargetType="{x:Type ProgressBar}">
                        <Rectangle Fill="#FF1FFF00"/>
                    </ControlTemplate>
                </ProgressBar.Template>
                <ProgressBar.Clip>
                    <PathGeometry>
                        <PathFigure StartPoint="{Binding ElementName=progress, Path=Value, Converter={StaticResource PointConverter}, ConverterParameter=1}">
                            <LineSegment Point="{Binding ElementName=progress, Path=Value, Converter={StaticResource PointConverter}, ConverterParameter=2}"/>
                            <LineSegment Point="{Binding ElementName=progress, Path=Value, Converter={StaticResource PointConverter}, ConverterParameter=3}"/>
                            <LineSegment Point="{Binding ElementName=progress, Path=Value, Converter={StaticResource PointConverter}, ConverterParameter=4}"/>
                            <LineSegment Point="{Binding ElementName=progress, Path=Value, Converter={StaticResource PointConverter}, ConverterParameter=5}"/>
                            <LineSegment Point="{Binding ElementName=progress, Path=Value, Converter={StaticResource PointConverter}, ConverterParameter=6}"/>
                        </PathFigure>
                    </PathGeometry>
                </ProgressBar.Clip>
            </ProgressBar>
        </Grid>
    </Window>
    

    Add this class into your MainWindow.xaml.cs file:

    public class PointConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            try
            {
                double val = (double)value;
                int num = int.Parse("" + parameter);
                if (num == 1)
                {
                    if (val < 50) return new Point(200 - val * 4, 200);
                    else return new Point(0, 200 - (val - 50) * 4);
                }
                else if (num == 2)
                {
                    if (val < 50) return new Point(200 - val * 4, 200);
                    else return new Point(0, 200);
                }
                else if (num == 3)
                {
                    return new Point(200, 200);
                }
                else if (num == 4)
                {
                    return new Point(200, 100);
                }
                else if (num == 5)
                {
                    if (val < 25) return new Point(200 - val * 4, 100);
                    else return new Point(100, 100);
                }
                else if (num == 6)
                {
                    if (val < 25) return new Point(200 - val * 4, 100);
                    else if (val < 75) return new Point(100, 100);
                    else return new Point(100, 200 - (val - 50) * 4);
                }
            }
            catch { }
    
            return new Point();
        }
    
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing application for iPhone using C sockets. At some point I'm performing recvfrom
I am doing application and I need to dispaly some images in a gridview.
I am doing an application in Yii Framework.I have progressed to some way like
i'm doing an application with ajax using jQuery and some other tools, and in
I am doing Multimedia application using client server interaction, for that i uploaded some
I'm doing one application like raising email intent by time using AlarmManager . In
I'm doing the application, the use of backbone.js and require.js, I would like to
Iam doing one application in iphone.In this i need to get the browsing history
hi i am doing one application here i need to disply 6 images in
I am doing one application using proximity sensor in android. when any object(finger) comes

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.