New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xaml[C]] cast to BindingBase before SetBinding() #709

Merged
merged 1 commit into from Feb 1, 2017

Conversation

Projects
None yet
4 participants
@StephaneDelcroix
Member

StephaneDelcroix commented Jan 24, 2017

Description of Change

Use the op_Implicit operator on the value to cast to BindingBase before calling SetBinding(). This allows scenarios like this to work:

<Label x:Name="label">
  <Label.Text>
    <OnPlatform x:TypeArguments="BindingBase" Android="{Binding Bar}">
      <OnPlatform.iOS>
        <Binding Path="Foo"/>
      </OnPlatform.iOS>
    </OnPlatform>
  </Label.Text>
</Label>

Bugs Fixed

API Changes

/

Behavioral Changes

/

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense

@StephaneDelcroix StephaneDelcroix merged commit d598d5e into master Feb 1, 2017

6 checks passed

Android-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: UI Tests :: OSX Test Cloud Package - Run Android 6.0.1 : Tests passed: 352, i…
Details
OSX-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: OSX Debug : Running
Details
Windows-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: Windows Debug : Tests passed: 3722, ignored: 10
Details
iOS10-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified iOS10 : Tests passed: 34…
Details
iOS8-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified IOS8 : Tests passed: 348…
Details
iOS9-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified iOS9 : Tests passed: 350…
Details

@StephaneDelcroix StephaneDelcroix deleted the fix-bz44213 branch Feb 1, 2017

@No1e

This comment has been minimized.

Show comment
Hide comment
@No1e

No1e Mar 22, 2017

Hi,

I tested this with the current version of Xamarin.

It does not work for Button.IsVisible or Button.IsEnabled.

No1e commented Mar 22, 2017

Hi,

I tested this with the current version of Xamarin.

It does not work for Button.IsVisible or Button.IsEnabled.

@StephaneDelcroix

This comment has been minimized.

Show comment
Hide comment
@StephaneDelcroix

StephaneDelcroix Mar 22, 2017

Member

@No1e please provide a repro, or file a bug

Member

StephaneDelcroix commented Mar 22, 2017

@No1e please provide a repro, or file a bug

@No1e

This comment has been minimized.

Show comment
Hide comment
@No1e

No1e Mar 22, 2017

HI Stephane,

Here is solution where you can reproduce.
CastToBindingBase.zip

No1e commented Mar 22, 2017

HI Stephane,

Here is solution where you can reproduce.
CastToBindingBase.zip

@StephaneDelcroix

This comment has been minimized.

Show comment
Hide comment
@StephaneDelcroix

StephaneDelcroix Mar 22, 2017

Member

@No1e the fix isn't present in the xf version referenced in your project. your project compiles fine on latest nightly (2.3.5.72-nightly). But I expect it to fail at runtime on iOS, due to this

    <OnPlatform x:TypeArguments="BindingBase"
        ...
	iOS="false"/>

if you still think there's a bug, please file it in bugzilla

Member

StephaneDelcroix commented Mar 22, 2017

@No1e the fix isn't present in the xf version referenced in your project. your project compiles fine on latest nightly (2.3.5.72-nightly). But I expect it to fail at runtime on iOS, due to this

    <OnPlatform x:TypeArguments="BindingBase"
        ...
	iOS="false"/>

if you still think there's a bug, please file it in bugzilla

@xamarin xamarin locked and limited conversation to collaborators Mar 22, 2017

@samhouts samhouts added D-15.4 and removed cla-already-signed labels Oct 10, 2017

@samhouts samhouts modified the milestones: 2.3.0, 2.3.5 Jun 27, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.