Repository navigation
Commit 4a4efcf
authored
fix(wpf): resolve XAML namespace under REACTIVE_SHIM in AutoDataTemplateBindingHook (#4404)
## Summary
Fixes #4398 — `AutoDataTemplateBindingHook` throws a
`XamlObjectReaderException` in the `ReactiveUI.Wpf.Reactive` (shim)
build because its inline `DataTemplate` XAML references the wrong
namespace.
## Root cause
`src/ReactiveUI.Wpf.Shared/Common/AutoDataTemplateBindingHook.cs` is
**shared source** compiled into two assemblies:
| Build | Project | `REACTIVE_SHIM` | C# namespace |
|---|---|---|---|
| lean | `ReactiveUI.Wpf` | undefined | `ReactiveUI` |
| shim | `ReactiveUI.Wpf.Reactive` | defined | `ReactiveUI.Reactive` |
The file already conditionally sets the **C# namespace** at the top:
```csharp
#if REACTIVE_SHIM
namespace ReactiveUI.Reactive;
#else
namespace ReactiveUI;
#endif
```
…but the inline `DataTemplate` XAML string hardcodes
`clr-namespace:ReactiveUI`:
```csharp
const string Template = "1 parent e0eea47 commit 4a4efcf
2 files changed
Lines changed: 36 additions & 1 deletion
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
25 | 37 | | |
26 | | - | |
| 38 | + | |
27 | 39 | | |
28 | 40 | | |
29 | 41 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
24 | 47 | | |
25 | 48 | | |
26 | 49 | | |
| |||
0 commit comments