Open jeromelaban opened 1 year ago
@ToddGlodek Thanks for the report. Could you attach the contents of the repository as a zip file? The repository is not public.
@ToddGlodek I'm still not seeing it, but it's best if you attach a zip file of the sample here anyways.
Thanks for the repro.
There are multiple issues here, but the first one is about https://github.com/unoplatform/uno/issues/3519, as the Loaded
event is raised differently than WinUI, causing the children list of your panel to be cleared of ellipses. You may want to avoid manipulating the Children this way in your sample, which prevents your dots from appearing.
Second, the dynamicLine
seems to be measured incorrectly as it has a DesiredSize
of 150x0
, causing it to not appear. There are no known workaround for this yet.
On a side note, you can use .OfType<Ellipse>()
instead of .Where(c => c.GetType() == typeof(Ellipse)).Cast<Ellipse>()
:)
So there are a few issues that I found during today's stream (https://www.youtube.com/watch?v=QkMXaBAcEd8).
Loaded
is not called at the right time, ActualSize
is not updated at the same time. Your sample makes use of that to determine the original position of the the polyline. You may want to refactor your panel to perform the polyline updates during MeasureOverride
, based on queued up changes. Note that ActualSize
on Windows may also contain wrong values (or off-by-one values).UIElement.Translation
is not implemented in Uno (https://github.com/unoplatform/uno/issues/10674), by you can use RenderTransform
instead:
ellipse.RenderTransform = new TranslateTransform() { X = -5f, Y = -5f };
Stretch
is None
. I'll rename this issue to reflect this particular behavior, and we'll close it when fixed.YouTubePowered by Restream https://restream.ioEvery Tuesday, come join me to take a look at what's new in Uno Platform, and dive into fixing some open issues.
Thanks for taking the time to do a deep-dive into the sample/test project. I shared the YouTube video with the people who are funding the project. Unfortunately, the consensus is that there is just too much that wasn’t yet implemented in Uno or that requires special work-arounds for our project funding to be continued at the current level going into 2023.
Until these items are fixed, I think every project that attempts to use Uno is going to hit the same sequence of pot-holes until they run out of budget and conclude that it isn’t a cost effective architecture. It would be an enormous help to all the new teams looking into Uno to become aware of these issues. Adding a description of the [EPIC] Controls initialization sequencehttps://github.com/unoplatform/uno/issues/3519 & its impact on ActualSize to the Welcome to Uno Platform! / Common Issueshttps://platform.uno/docs/articles/get-started-wizard.html documentation would really valuable to anybody just getting started.
There's an issue with the bounds computation of the shape when the Stretch is None. I'll rename this issue to reflect this particular behavior, and we'll close it when fixed.
This specific point might get fixed with https://github.com/unoplatform/uno/pull/13359
Originally posted by @ToddGlodek in https://github.com/unoplatform/uno/discussions/10638
The goal is to build a charting control where the collection of vertices can be updated dynamically in a ViewModel. The chart reacts to the ViewModel change - and rebuilds the Points collection of a PolyLine by inverting the Y-axis of each of the vertices so that the origin is in the lower-left (rather than upper-left). Rescalling the size of the window - must result in the control being redrawn adaptively/fluidly to maintain the same Y-scale proportions - while allowing the X-scale to expand & contract.
This can be done using WinUI - but was WASM does not render the PolyLine when Points collection is changed dynamically. Here a PolyLine with dynamically modified Points collection (Pink) is on WinUI - but not WASM. Observe how the static line where the points collection is never changes (green) renders on both WinUI/WASM.
Repro: https://github.com/unoplatform/uno/files/10167614/PolyLinePanelWasmTest-master.zip