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

I don't know why I don't see the icon's that has been passing through

$
0
0

hi Guys,

I'll try to make my question simpel:

I have a page where you can switch a bunch of things on (like airco, wifi) and the switched on things must be passed to the nextpage and be shown as a icon. For some reason it fills the space but I don't see the icon's, maybe I miss something. Can somebody help me out? I have a viewmodel where I have implemented this

ImageSource GetVoorzieningIcon(FacilityType type)
        {
            switch (type)
            {
                case FacilityType.WiFi:
                    {
                        return ImageSource.FromResource("Images.wifi.png");
                    }
                case FacilityType.Bathroom:
                    {
                        return ImageSource.FromResource("Images.bathtub.png");
                    }
                case FacilityType.Kitchen:
                    {
                        return ImageSource.FromResource("Images.kitchen.png");
                    }
                case FacilityType.Breakfast:
                    {
                        return ImageSource.FromResource("Images.breakfast.png");
                    }
                case FacilityType.Elevator:
                    {
                        return ImageSource.FromResource(".Images.tv.png");
                    }
                case FacilityType.Airco:
                    {
                        return ImageSource.FromResource(".Images.airco.png");
                    }
                case FacilityType.Heating:
                    {
                        return ImageSource.FromResource(".Images.Verwarming.png");
                    }

                default:
                    break;
            }
            return null;

And this is the page where it must be shown

    <Grid 
                        x:Name="VoorzieningenGrid"
                        Padding="0,5,0,0"
                        HorizontalOptions="FillAndExpand"
                        VerticalOptions="FillAndExpand">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                    </Grid>

Viewing all articles
Browse latest Browse all 77050

Trending Articles



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