-
- devonserden
- Posts: 1
- Joined:
Create custom links in noesis
Hello, I need instructions on how to create custom bindings in Noesis to use in markup just like regular binding?
Thank you for supporting
Thank you for supporting
Re: Create custom links in noesis
You need to create a custom DependencyProperty?
Or you want to create your own {Binding ...} attribute? like {MyCustomBinding ...}? I don't think this is supported, but you can check Markup Extensions maybe this is what you're looking for.
Hint: If you don't find documentation/example code for a specific Noesis feature, Google it for WPF, Noesis and WPF are extremely similar, and you have high chances that the code you find for WPF will work in Noesis with little to no edit.
Code: Select all
public class YourUserControl : UserControl
{
// Note: DependencyProperty should always have the name (Property name) + "Property" suffix:
// (Test -> TestProperty, Value -> ValueProperty...
public static readonly DependencyProperty TestProperty = DependencyProperty.Register(nameof(Test), typeof(YourUserControl), typeof(int));
// Here's your current property you bind to in Xaml: Test = {Binding ViewModel.TestValue}
public int Test
{
get => (int)GetValue(TestProperty );
set => SetValue(TestProperty, value);
}
}
Hint: If you don't find documentation/example code for a specific Noesis feature, Google it for WPF, Noesis and WPF are extremely similar, and you have high chances that the code you find for WPF will work in Noesis with little to no edit.
Who is online
Users browsing this forum: No registered users and 1 guest