Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Forms2Native Example for WinPhone 8.1 Xaml (WinRT)

$
0
0

Hi.
I'm trying to implement the same pattern in Forms2Native example for WinPhone Silverlight that in the example...
But.
There is no Childern property.
in the example:

`public class MySecondPageRenderer : PageRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.Page> e)
{
base.OnElementChanged(e);

        var page = e.NewElement as MySecondPage;

        var stkpanel = new System.Windows.Controls.StackPanel();
        stkpanel.Orientation = System.Windows.Controls.Orientation.Horizontal;

        var label = new System.Windows.Controls.TextBlock
        {
            Text = "2" + page.Heading
        };

        stkpanel.Children.Add(label);

        this.Children.Add(stkpanel);
    }`

but for winPhone 8.1 WinRT , PageRenderer is implemented with:

protected override void OnElementChanged(VisualElementChangedEventArgs e)

so i guess there is no Panel to have Childern property.

Does anyone knows how to inject native control with this PageRenderer?
Is there any example out there for Forms2native for WinPhone 8.1 WinRT?

Thanks


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>