You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm implementing CircularProgressBar like on the image below:
In my implementation there three modes:
indeterminate
percentage without text
percentage with text
Percentage with and without text works same except control to display progress, Sector without text and Arc with text.
I noticed that code of this two controls works similar, the only difference that the first renders closed shape, and the second is not, so it looks like code duplicate. I think, code of these two classes can be generalized to base class, e.g. RotateShape or CircularShape. Also, it can be usefull in some scenarios where any of it (Sector or Arc) may be used.
For example, in my case for both controls I set StartAngle and SwepAngle, but if it will be generalized, I can work with them without duplicating code.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm implementing

CircularProgressBarlike on the image below:In my implementation there three modes:
Percentage with and without text works same except control to display progress,
Sectorwithout text andArcwith text.I noticed that code of this two controls works similar, the only difference that the first renders closed shape, and the second is not, so it looks like code duplicate. I think, code of these two classes can be generalized to base class, e.g.
RotateShapeorCircularShape. Also, it can be usefull in some scenarios where any of it (SectororArc) may be used.For example, in my case for both controls I set
StartAngleandSwepAngle, but if it will be generalized, I can work with them without duplicating code.Beta Was this translation helpful? Give feedback.
All reactions