Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Preview of page using Control Tempate does not show controls contained in content presented.

$
0
0

Looking at this xamarin-forms-samples/Templates/ControlTemplates/SimpleTheme/

I have a control template in the resource dictionary:

    <ResourceDictionary>
        <ControlTemplate x:Key="TealTemplate">
            <Grid> <!-- omitted detail here  -->
                <ContentPresenter Grid.Row="1" Grid.ColumnSpan="2" />

If I then look a the actual page:

<ContentView x:Name="contentView" Padding="0,20,0,0" ControlTemplate="{StaticResource TealTemplate}">
    <StackLayout VerticalOptions="CenterAndExpand">
        <Label Text="Welcome to the app!" HorizontalOptions="Center" />

When I look at the previewer for the page, I only see the Control Template content, I don't see the label

Is this a bug? Intended behaviour? Or is there a way of seeing the page including control template elements and the content of the page itself.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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