View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002476 | NoesisGUI | C# SDK | public | 2022-12-13 06:54 | 2023-03-27 12:14 |
Reporter | jphyzic | Assigned To | sfernandez | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | assigned | Resolution | open | ||
Product Version | 3.1.4 | ||||
Target Version | 3.2 | ||||
Summary | 0002476: DependencyProperty.AddOwner fails without default value, invalid callback registration | ||||
Description | Calling DependencyProperty.AddOwner for user-defined DP with PropertyMetadata without specifying default value causes runtime exception. Calling DependencyProperty.AddOwner for user-defined DP with PropertyMetadata with default value and a property change callback causes parent DP value changed callback to be called with arguments from type that called AddOwner. | ||||
Steps To Reproduce | See forum post: https://www.noesisengine.com/forums/viewtopic.php?t=2813 public partial class UserControlA : UserControl { public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(int), typeof(UserControlA), new PropertyMetadata(5, OnValueChanged)); ... } public partial class UserControlB : UserControl { public static readonly DependencyProperty ValueProperty = UserControlA.ValueProperty.AddOwner(typeof(UserControlB), new PropertyMetadata(OnValueChanged)); ... } Instantiating both of these classes in XAML causes runtime exception. Specifying default value in UserControlB DP registration causes UserControlA.OnValueChanged to be called when UserControlB.Value changes. | ||||
Tags | No tags attached. | ||||
Platform | Any | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2022-12-13 06:54 | jphyzic | New Issue | |
2022-12-13 06:57 | jphyzic | Steps to Reproduce Updated | |
2022-12-19 13:02 | sfernandez | Assigned To | => sfernandez |
2022-12-19 13:02 | sfernandez | Status | new => assigned |
2022-12-19 13:02 | sfernandez | Target Version | => 3.2.0 |
2023-03-27 12:14 | jsantos | Target Version | 3.2.0 => 3.2 |