-
-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature proposal: Gauge Control #909
base: development
Are you sure you want to change the base?
Conversation
Added a reference to the new 'Gauge' control.
Added a custom 'Gauge' control for displaying values.
Added a default control and style template for the 'Gauge' control.
Increased default thickness
Added FrameworkPropertyMetadataOptions.AffectsRender for Content and Header property
@ElectroAttacks If you resize the control what does the gauge do? Does it resize correctly? |
Well, the default template for the Gauge includes a Data binding that ensures symmetrical resizing. If the control is resized it will be redrawn based on the new location and size, like a normal control will do. The Arc control inherits from a shape, which can lead to weird behavior if you stack two of them and perform any resizing. That's one of the reasons the Gauge control is derived from the RangeBase class. |
@ElectroAttacks Well the arc couldn't do that, at least in 2.1. That's why i'm asking. |
@m0lDaViA This is exactly what I figured out. I reported that issue a few months ago and fixed it myself... I'm already working on splitting the logic of the Gauge control into a base class and two controls, so it will be structured like so:
But that might take a while due to the complexity of the Angular Gauge. I want a kinda similar experience than the one in Livecharts 2... For the Arc itself it might be easier to figure out why a size change does not affect render by default, maybe it would be enough to override it's MetaData to enable the redrawing... |
@ElectroAttacks As i wanted to create a knob control myself i was thinking about fixing the arc. |
@m0lDaViA Well, I had some ideas that might fix the issue where the arc is not being redrawn after a resize, if you are talking about that issue. |
I'm still not sure if these types of controls should be in the main package or if it would be better to create a new one, like Wpf.Ui.Diagrams or something like that |
@pomianowski Well, yeah it would make maintenance a little bit easier... I would prefer Wpf.Ui.Graphs though. |
@pomianowski |
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Other information