Is it possible to adjust Visiblox's labels container? I have encounter a problem with render ranges of axis. Image:
As You can see there is a problem with width of each label (there is 75, and then 10 (one zero has gone)), and my code for ranges is:
<charts:LinearAxis.Range>
<charts:DoubleRange Minimum="-150" Maximum="150"/>
</charts:LinearAxis.Range>
But! If I changed it ranges to -1500,1500 i get this:
And in this case, label for value 750 display as 75.
Have I change style or tamplate to solve this?
I have solved it after playing around with properties of main window, and... simply can't do:
UseLayoutRounding="True"
After setting it on False, I got this:
I hope, that this will be useful for someone :)
PS.: That "bug" was in WPF (I have forgot to write about it)
Related
I have a chart and a datagridview, both of them are databound to a dictionary, for example:
freqChart.Series[0].Points.DataBindXY(symCount.Keys, symCount.Values);
And on the screenshot below you can see the difference in X-Axis label/key names. Datagridview shows it correctly, while chart flips char if it's punctuation char. What's the problem? How do I fix it?
Screenshot (Chart and DataGridView):
My comment was wrong; in fact this is a funny effect you get when you have a RightToLeft turned on.
There are several values but this one is enough to reproduce:
freqChart.RightToLeft = RightToLeft.Yes
Either this is what you want, then you can turn it on for the DGV as well; or it isn't then simply turn it off..
freqChart.RightToLeft = RightToLeft.No
As you can see it is a Control.Property so it will work on all controls. Also to be noted: The RightToLeft property is an ambient property, so it propagates to child controls.
Why it acts so strangly I can't say, though. The docs basically talk about alignment, not punctuation. If you are interested you may want to read up on it in wikipedia
I want to make a vertical meter for values between 2 ranges.
so what i tried so far, was to make a frame, and under it put a mask, and under that a rectangle.
with the idea, of lowering/increasing the rectangle Y position to make it seems to move.
rect.position = new Vector3(rect.position.x, (rect.position.y - rect.sizeDelta.y));
so i did that, to first lower by it's height, so the bar will seem empty.
but it doesn't work right, the position depends on the screen size, and the rect Y end up way lower then exactly his height.
so, tl;dr, i want a bar that i can give a value between 0-100 and it will fill it according to that.
and i might have gone wrong about it.
so, any suggestions would be appreciated.
edit:
Add picture to show what i want the bar to look like:
Well i feel kinda dumb
I didn't realize how customizable the Slider control is.
I removed it's handle, unchecked interactble and removed it's background, and now i can give it a value between 0-100 and it works exactly as i wanted.
thanks Mathias Siig Nørregaard for referencing me to the video link that opened my eyes.
I'm using Windows Forms.NET.
I've configured a button in the following way:
ImageAlign: MiddleCenter
TextAlign: MiddleCenter
TextImageRelation: ImageBeforeText
The problem is, when I make button wider than usual, its contents are no longer centered:
Why is it so? How can I correct it?
I think the Text and Image share 2 even parts of the Button Client area horizontally. So if you set the TextImageRelation as OverLay, ImageAboveText, TextAboveImage they should be what we expect. But for other values, they act differently. I think that's by design.
To solve your problem, I have tried changing ImageAlign to MiddleRight and it works as what you want.
Again, I think that's by design. :)
I have a WPF DataGrid and the row headers don't line up vertically with the content. Any idea why?
Seems like the RowHeaders default to VerticalAlignment = Center and TextBlock defaults to Top. They are still a little off from one another but once I changed that property it was close enough for me!
Have you tried making the row height to lets say double of it's current size? It might point you that you have different alignment/padding properties set for them :) Just a suggestion tho :) And yeah, code would be helpful :)
I believe by default the row headers are aligned like that. You should be able to tell what alignment you want by saying something like:
yourDataDrid.RowHeaderStyle.BasedOn = yourDataDrid.CellStyle;
I'm currently using a semi-transparent WPF form with no border as a camera style device in a program of mine. However, when I access the position (top, left) and dimension (height, width) properties of the form, it would appear they are wrong.
The top property reported to be roughly 26 pixels higher than it actually is in relation to the desktop. IE if I put the forms top and left at (0,0) the properties will report (0, -26).
The height is also incorrect, reporting about 50-60 pixels shorter than it actually is.
Has anybody experienced this problem in the past and have a solution?
Regards,
Andy Hunt
if I understand correctly, this is no problem at all but the expected behavior.
WPF uses DPI-independent virtual units for measuring size and position, not actual pixels.
There are many sources like this explaining this.
If I understood the question wrong (its late and I am tired ;) could you provide a code sample illustrating the issue?
Andrej