microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.28k stars 675 forks source link

[Run Text] No Text DependencyProperty available to be able to bind a value in code behind #8253

Open agneszitte opened 1 year ago

agneszitte commented 1 year ago

Describe the bug

No Text DependencyProperty available to be able to bind a value in code behind for Run like we are able to do in the XAML

Steps to reproduce the bug

Be able to Bind the Text property in code-behind like we are able to do in XAML

<TextBlock>
  <Run Text="Example:" />
  <Run Text="{Binding BindingExample}" />
</TextBlock>

Expected behavior

A Text DependencyProperty should be available to be able to bind a value in code behind for Run like we are able to do in XAML

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.3 Experimental 1: 1.3.230202101-experimental1

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

jeromelaban commented 10 months ago

Some additional context for this issue, as part of Uno Platform 5.0, we're adding support for C# Markup a way to have a C# fluent friendly API to build WinUI apps, and we cannot replicate this XAML behavior easily, and our workaround is to use XamlReader which makes for a poorly performing solution.