Skip to content

Uno does not support specific case with RelativeSource TemplatedParent binding #8049

Closed

Description

@HavenDV

Current behavior

<TextBox Text="Username">
    <TextBox.Header>
        <StackPanel>
            <TextBlock Text="Username"/>
        </StackPanel>
    </TextBox.Header>
    <TextBox.HeaderTemplate>
        <DataTemplate>
            <ContentControl
                Content="{Binding Content, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                />
        </DataTemplate>
    </TextBox.HeaderTemplate>
</TextBox>

Binding like this is not supported by Uno. Here's my StackOverflow question about it: https://stackoverflow.com/questions/70818344/uwp-winui-override-textbox-headertemplate-so-that-it-can-display-complex-conten/70818345#70818345

Expected behavior

No response

How to reproduce it (as minimally and precisely as possible)

http://playground.platform.uno/#1f901c6b

Workaround

No response

Works on UWP/WinUI

Yes

Environment

Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia

NuGet package version(s)

4.1.0-dev.724

Affected platforms

WebAssembly

IDE

Visual Studio 2022

IDE version

17.1 preview 5

Relevant plugins

No response

Anything else we need to know?

No response

Activity

  1. added
    difficulty/tbd
    kind/bug
    triage/untriaged
    on Feb 9, 2022
  2. added
    project/binding 🪢
    and removed
    triage/untriaged
    difficulty/tbd
    on Feb 9, 2022
  3. jeromelaban commented on Feb 9, 2022

    @jeromelaban
    Member

    Thanks for the report. TemplateBinding is behaving differently in uno currently, and this will be addressed by #1621. Close this one as a duplicate.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugproject/binding 🪢

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions