Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF c# .net framework 4.8 x:Bind

Tags:

c#

wpf

xbind

I read about x:Bind, it has better performance vs Binding. But in my application WPF C# with .NET Framework 4.8 when I put x:Bind in any part (TextBox Text="{x:Bind ...}"), Visual Studio say to me "Bind is not supported in a Windows Presentation Foundation (WPF) project."

Is not possible you x:Bind in WPF C# Application for Desktop? Or what I need to do for use it?

like image 598
Anton Nikolayevich Avatar asked Jul 16 '26 04:07

Anton Nikolayevich


1 Answers

I am afraid x:Bind is currently only supported in the Universal Windows Platform (UWP) and not in WPF/.NET Framework so the error message is correct.

You can host UWP controls in a WPF app using XAML Islands but there is no way to use a compiled binding directly on a WPF dependency property.

like image 190
mm8 Avatar answered Jul 18 '26 18:07

mm8



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!