Repository navigation
Labels
area/code-generationCategorizes an issue or PR as relevant to code generationarea/xaml-readerCategorizes an issue or PR as relevant to the XAML Readerkind/papercutIssue that is especially relevant to users beginning to use Uno
Description
Current behavior 🐛
Reported in davidxuang/FluentIcons#37. Data binding on custom dependency properties does not work on Uno.WinUI while it works as expected on WinAppSDK. This behaviour consist across multiple Uno 6.x versions. We tried to compare our code base to Uno controls like https://github.com/unoplatform/uno/blob/master/src/Uno.UI/UI/Xaml/Controls/Icons/FontIcon.cs but didn't find noticable differences.
Expected behavior 🎯
See reproduction
How to reproduce it (as minimally and precisely as possible) 🔬
A demo is uploaded to https://github.com/davidxuang/FluentIcons/tree/uno-binding.
<Page
x:Class="UnoApp1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ic="using:FluentIcons.WinUI"
xmlns:local="using:UnoApp1"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<ScrollViewer IsTabStop="True">
<Grid>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock
HorizontalAlignment="Center"
AutomationProperties.AutomationId="HelloTextBlock"
Text="{x:Bind Text}" />
<ic:FluentIcon Icon="Add" />
<ic:FluentIcon Icon="{x:Bind Path=Icon}" />
</StackPanel>
</Grid>
</ScrollViewer>
</Page>using FluentIcons.Common;
namespace UnoApp1;
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}
public string Text => Icon.ToString();
public Icon Icon => Icon.Add;
}With WinAppSDK unpackaged:
With Uno Desktop:
Workaround 🛠️
No response
Renderer 🎨
- Skia
- Native
Affected platforms 📱💻🖥️
Desktop (Windows)
Uno.Sdk version (and other relevant versions) 📦
6.4.31
IDE version 🧑💻
Visual Studio 2026 18.0.2
Anything else we need to know? 💬
No response
Reacted by Mike Marynowski
Reacted by Copilot
Metadata
Metadata
Assignees
Labels
area/code-generationCategorizes an issue or PR as relevant to code generationarea/xaml-readerCategorizes an issue or PR as relevant to the XAML Readerkind/papercutIssue that is especially relevant to users beginning to use Uno
Activity
davidxuang commentedon Nov 30, 2025
I have identified the source of the bug. This is something similar to #11. Uno XAML source generator tried to test if
FluentIconis a markup extension, butFluentIconExtensionin the same namespace got tested instead.uno/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs
Line 2032 in f5ea9ec
Which prevents the emission of binding code by
BuildComplexPropertyValuehere:uno/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs
Lines 3117 to 3128 in f5ea9ec
This behaviour is different from WinUI and might needs to be fixed.
This is the calling stack for the generator:
[-]`x:Bind` does not work on custom controls[/-][+]Binding codes are not emitted when the type `{Control}Extension` exists in the same namespace[/+]github-actions commentedon May 19, 2026
This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.
fix: Emit bindings on controls that have a companion markup extension
khaskoul commentedon Aug 3, 2026
6.7.0-dev.160net10.0-desktop,net10.0-windows10.0.26100,net10.0-browserwasm(all 0 warnings / 0 errors)fix(xamlgen): Don't treat markup ext Name as x:Name