Skip to content
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

Border Stoke data binding does not work #19201

Closed
kluzen opened this issue Dec 4, 2023 · 3 comments
Closed

Border Stoke data binding does not work #19201

kluzen opened this issue Dec 4, 2023 · 3 comments
Labels
area-controls-border Border area-xaml XAML, CSS, Triggers, Behaviors platform/android 🤖 s/needs-repro Attach a solution or code which reproduces the issue t/bug Something isn't working

Comments

@kluzen
Copy link

kluzen commented Dec 4, 2023

Description

Binding the Stroke property of a Border in order to dynamically set its color does not work. I would expect the property to function the same way BorderColor does on a Frame.

Steps to Reproduce

Create a new .net maui app.
Replace main page with:

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="MauiTestApp.MainPage">

  <ScrollView>
    <VerticalStackLayout
            Padding="30,0"
            Spacing="25">

      <Entry Text="#FF0000" x:Name="ColorEntry" />

      <Border BindingContext="{x:Reference ColorEntry}"
              Stroke="{Binding Path=Text}">
        <Label Text="Border Test" />
      </Border>

      <Frame BindingContext="{x:Reference ColorEntry}"
             BorderColor="{Binding Path=Text}">
        <Label Text="Frame Test" />
      </Frame>
    </VerticalStackLayout>
  </ScrollView>

</ContentPage>

Change entry text to different hex colors. The Frame control updates but the Border control does not.

Link to public reproduction project repository

No response

Version with bug

8.0.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@kluzen kluzen added the t/bug Something isn't working label Dec 4, 2023
@drasticactions
Copy link
Contributor

This could be similar, if not the same as, #19075

The underlying binding is sending values to Border, but it's not being redrawn if changed. So it may not be the binding not working, but the control not properly updating with the change.

@jsuarezruiz jsuarezruiz added area-xaml XAML, CSS, Triggers, Behaviors area-controls-border Border labels Dec 5, 2023
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Dec 5, 2023
@PureWeen PureWeen added the s/needs-repro Attach a solution or code which reproduces the issue label Dec 21, 2023
@ghost
Copy link

ghost commented Dec 21, 2023

Hi @kluzen. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@ghost ghost added the s/no-recent-activity Issue has had no recent activity label Dec 25, 2023
@ghost
Copy link

ghost commented Dec 25, 2023

This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

@ghost ghost closed this as completed Dec 28, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2024
@ghost ghost removed the s/no-recent-activity Issue has had no recent activity label Jan 28, 2024
@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-border Border area-xaml XAML, CSS, Triggers, Behaviors platform/android 🤖 s/needs-repro Attach a solution or code which reproduces the issue t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants