I am a newbie so I started learn how to apply plugin name Xam.Plugin.Forms.ImageCircle in my Xamarin Project. I add platform WPF instead of UWP and after I install plugin above and I can not call ImageCircleRenderer.Init() in file App.xaml.cs. So I wonder if I can use this plugin and how to configure it in case using this plugin is possible in WPF. Thank you
Asked
Active
Viewed 60 times
2 Answers
1
I have checked the package on wpf, it does not work.
If you want to use circle images in wpf, you could try the code below.
<Ellipse Width="250" Height="250">
<Ellipse.Fill>
<ImageBrush ImageSource="http://upload.wikimedia.org/wikipedia/commons/5/55/Tamarin_portrait.JPG" />
</Ellipse.Fill>
</Ellipse>

Wendy Zang - MSFT
- 10,509
- 1
- 7
- 17
0
Xamarin.Forms plugins consists of essentially two parts. The Xamarin.Forms element that you place of the shared page or view and a platform specific renderer, which tells the specific platforms how to draw the element using native controls and UI.
The plugin your talking about doesn't have a platform implementation for WPF, so although you can add the pacakge in you shared XF project, it won't be rendered in the WPF app.
You could port the UWP renderer to WPF as they are similar Renderer.uwp.cs, but there are big differences between the syntax and availble UI elements on UWP and WPF.

newky2k
- 419
- 5
- 12
-
1Thank you for your sharing. I was thought that that plugin might not be supported in WPF because I could not use the name of the package after download. Also, I have another question that Should I use UWP or WPF while using Xamarin. As far as I see, Microsoft supports UWP better than they do to WPF – Đức Tú Jul 11 '21 at 17:55
-
Xamarin targets UWP primarily because it worked on mobile so it made sense. There is a WPF implementation of Xamarin.Forms but most plugins and extensions target iOS, WPF and UWP typically so that may be your best option. – newky2k Jul 12 '21 at 08:16