locked
Xamarin Forms 3.3.0 error: No property, bindable property or event found for UWP RRS feed

  • Question

  • User378533 posted

    I met strange error for UWP from following xaml:

    <ContentPage.ToolbarItems>
        <ToolbarItem Text="{Binding [SelectData]}" Command="{Binding AddNewDataCommand}">
          <ToolbarItem.Icon>
            <OnPlatform x:TypeArguments="FileImageSource" iOS="data.png" UWP="Assets/data.png"/>
          </ToolbarItem.Icon>
        </ToolbarItem>
        ...
    </ContentPage.ToolbarItems>
    

    When compile, I got:

    No property, bindable property, or event found for 'UWP', or mismatching type between value and property.

    Why ?

    Friday, October 19, 2018 10:36 AM

All replies

  • User371688 posted

    @Sonic3R I have tested the code ,but I couldn't reproduce the problem.Could you post a basic demo?

    Monday, October 22, 2018 9:26 AM
  • User378533 posted

    Did you tested with Xamarin Forms 3.3.0 ? If so, shouldn't work because of x:TypeArguments="FileImageSource", I don't know why.

    If I remove x:TypeArguments="FileImageSource" then will work

    Monday, October 22, 2018 12:21 PM
  • User380997 posted

    Any update on this?

    Thursday, December 27, 2018 7:09 PM
  • User202747 posted

    Same problem still exists in XF3.6 I solved it this way but dont understand why it works, hopefully someone form Xamarin internals will explain why UWP is not exisitng as a property of OnPlatform, and as a trial the same goes for WPF

    
    
        
          
            
                
    
                    
    Tuesday, March 19, 2019 9:01 AM
  • User53115 posted

    You're trying to use the old, deprecated version of OnPlatform. You want to use the new full syntax or markup extension. Either of these should work:

    <ToolbarItem 
        Text="{Binding [SelectData]}" 
        Command="{Binding AddNewDataCommand}">
      <ToolbarItem.Icon>
        <OnPlatform x:TypeArguments="FileImageSource">
            <On Platform="iOS">data.png</On>
            <On Platform="Android">data.png</On>
            <On Platform="UWP">Assets/data.png</On>
      </ToolbarItem.Icon>
    </ToolbarItem>
    
    <ToolbarItem 
        Text="{Binding [SelectData]}" 
        Command="{Binding AddNewDataCommand}" 
        Icon="{OnPlatform Android=data.png, iOS=data.png, UWP=Assets/data.png"/>
    
    Tuesday, March 19, 2019 1:52 PM
  • User304915 posted

    I've search numerous times for lengthy periods. Can someone please give me the link to this XAML OnPlatform documentation (not the deprecated version).

    Monday, April 1, 2019 8:14 PM
  • User304915 posted

    I've search numerous times for lengthy periods. Can someone please give me the link to this XAML OnPlatform documentation (not the deprecated version).

    Monday, April 1, 2019 8:14 PM
  • User53115 posted

    @"TonyLugg.7048" You need to train in Google-fu. All of these links are on the first page when I searched for "xamarin forms onplatform":

    https://xamarinhelp.com/xamarin-forms-onplatform-runtimeplatform/ https://montemagno.com/important-onplatform-changes-xamarin-forms/ https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-basics/essential-xaml-syntax#platform-differences-with-onplatform

    Monday, April 1, 2019 8:36 PM
  • User304915 posted

    :( You're right. No more Bing search form me....@JoeManke

    Monday, April 1, 2019 8:47 PM