question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

XamlCompiler error WMC1118,TwoWay binding target must be a dependency property

See original GitHub issue
 <local:FolderPicker Grid.Row="0" HeaderText="Save Folder" Folder="{x:Bind Attributes.(local:WebUrlRetrieveData.Folder),Mode=TwoWay}"></local:FolderPicker>

XamlCompiler error WMC1118: TwoWay binding target ‘Folder’ must be a dependency property

idl

    [default_interface]
    runtimeclass FolderPicker : Microsoft.UI.Xaml.Controls.Control
    {
        FolderPicker();
        String HeaderText;
        String Folder;
        Microsoft.UI.Xaml.DependencyProperty Folder2;
    }

i don’t know why it throws such an error.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ranjeshjcommented, Jul 7, 2021

@shelllet the dependency property needs to be written in a certain way. You can look at details here - https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/custom-dependency-properties#dependency-property-name-conventions

0reactions
shellletcommented, Jul 9, 2021

@shelllet the dependency property needs to be written in a certain way. You can look at details here - https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/custom-dependency-properties#dependency-property-name-conventions

it’s my fault, I didn’t notice: folder and folderproperty must exist at the same time. thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

WPF usercontrol Twoway binding Dependency Property
Bind the TextBox.Text property in the UserControl to its SampleProperty like this: <TextBox Text="{Binding SampleProperty, ...
Read more >
Dependency properties overview - UWP applications
A dependency property represents or supports a specific feature of the programming model for defining a Windows Runtime app with XAML for UI...
Read more >
DependencyProperty not working in derived UserControl
When binding a DependencyProperty will never hit the setter. That's why you have the OnMyPropertyChanged handler. In other words your setter ...
Read more >
Two-way binding inside a XAML User Control - Jerry Nixon
A data binding source source CAN be a CLR-type property. A data binding target MUST be a dependency property. This is an immutable...
Read more >
Bind dependency property in custom column not working
Hello, I try to set a dependency property in a gridviews custom column, based on GridViewBoundColumnBase, with binding to another field of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found