Overall, MagixaVoxel for Mac is a lightweight 8-bit voxel art editor and interactive path tracing renderer. The intuitive interface makes it great for creating unique 3D models with ease. It is 100% free to use for any project, and does not require a commercial license. Find MagicaVoxel for Windows here.
3d Rendering App
Accepted Answer
using Windows.UI.Xaml; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Shapes; using Xamarin.Forms; using Xamarin.Forms.Platform.UWP; using Ximon.Controls;
[assembly: ExportRenderer(typeof(TriangleView), typeof(Ximon.TriangleViewRenderer))] namespace Ximon { public class TriangleViewRenderer : ViewRenderer<TriangleView, Windows.UI.Xaml.Shapes.Polygon> { //bool _sizeChangedEventSet = false; public TriangleViewRenderer() { SizeChanged += TriangleViewRenderer_SizeChanged; }
}
You're welcome.
Hi,
It doesn't work for me..
The TriangleShapeRenderer for UWP
The TriangleShape object is the following :
Can you help me please?
Thank in advance !
Maxime, you did not follow my example. You need to wire the SizeChanged event:
public TriangleViewRenderer() { SizeChanged += TriangleViewRenderer_SizeChanged; }
When I'm debugging the app with 'Local Machine', so x64, the Triangle is good about the screen, however, when I put the app into fullscreen, the Triangle is re-scaling, but not if I go back to a normal screen, I don't know how to explain better..
There is, a setp by step rendering:
1 - Normal 2 - Put to fullscreen 3 - Back to normal
At the end, only the fullscreen has the good proportional rendering
Maxime, does this happen in Android or iOS? I get these issues as well in UWP/Local Machine, but not just for the triangle, a lot of other controls behave this way as well. After you go back to normal screen, resize the screen a little and see if it snaps into place.
edited September 2016
I didn't test actually for Android/iOS, but on UWP, I got, sometimes, a problem of scalling yeah, the <Content.Page> xaml layout goes out of the screen at the bottom, so 5%-10% of the app is missing at the bottom..
However, it only appears when I run the app (Compiled by Debugging) without being connected to the computer, on my WinPhone.. It's a bit boring because I need to make a complex draw in order to realize the design or my app.
There is the form/draw I need
Note:Ok, it's not a triangle, but with the polygon logic, I can realize it
Now the thing is, about the code above, you're drawing from renderer, then, how do you do for Android/iOS?
Thank in advance !
For android and ios, each renderer class has a 'Draw' method to override. It's different than UWP, because in Android/iOS you actually DRAW the shape on the canvas for context.
edited September 2016
Ho ok thank does it can work as a polygon? I mean, point to point?
0
Hmm, ok I'll take a look and I come back to you if I have a question Maybe it can be usefull about this thread
@JimTyminski Does this custom renderer display the triangle when you enable 'Compile with .NET Native tool chain'? The setting is in the UWP project > properties > build.
I'm finding that my custom renderer's constructor isn't getting called nor any of its methods, like OnElementChanged, OnElementPropertyChanged, when I enable .NET Native. I'm curious if you've seen the same.
Weird, try my solution, do know if it work with your configuration, but if you have a win machine, just run with (x86, local)
edited October 2016
Thanks. I found out that I have to include the TypeInfo.Assembly for my custom renderer in the Xamarin.Forms.Forms.Init call.
This is what it looks like, in my case. I was trying to use the NControl library: