View Issue Details

IDProjectCategoryView StatusLast Update
0003912NoesisGUIUnitypublic2026-03-04 00:39
ReporterKeldorKatarn Assigned Tosfernandez  
PrioritynormalSeverityminor 
Status assignedResolutionopen 
Product Version3.2.6 
Target Version3.2.13 
Summary0003912: WPF Inconsistency: Freezable.CreateInstanceCore method is not overridable
Description

Freezable.CreateInstanceCore method is not overridable in Noesis.

I'm not sure how Noesis accomplishes the same thing, but it's an API inconsistency.

PlatformAny

Activities

sfernandez

sfernandez

2025-01-24 10:26

manager   ~0010288

Right now it is implemented in our internal base class by calling the Activator.CreateInstance for the default constructor.
Do you need to create the object in a different way or would that be enough?

KeldorKatarn

KeldorKatarn

2025-01-24 20:59

reporter   ~0010289

Last edited: 2025-01-24 21:01

In Caliburn the parameter class implements it like this

    protected override Freezable CreateInstanceCore()
    {
        return new Parameter();
    }

The parameter class is used in this way:

<UserControl x:Class="Caliburn.Micro.HelloParameters.ShellView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:cal="http://www.caliburnproject.org">
<StackPanel>
<TextBox x:Name="Name" />
<Button Content="Click Me">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cal:ActionMessage MethodName="SayHello">
<cal:Parameter Value="{Binding ElementName=Name, Path=Text}" />
</cal:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</StackPanel>
</UserControl>

as well as generated in code by Caliburn's conventions.
It seems to work fine in Caliburn.Noesis without me implementing CreateInstanceCore, I'm just not sure what it does internally in Noesis and whether it basically achieves the same thing without me having to override it?
If the same thing is achieved, then for MY purposes this can be closed. However there might be SOME types that want to customize how the instance is created, so it would be nice to be able to override it I guess (personally never had the need, I always just called the default constructor when overriding this, but it CAN be a use-case, to want to call a specific constructor to create the C# instance)

Issue History

Date Modified Username Field Change
2025-01-22 00:42 KeldorKatarn New Issue
2025-01-24 10:25 sfernandez Assigned To => sfernandez
2025-01-24 10:25 sfernandez Status new => assigned
2025-01-24 10:25 sfernandez Target Version => 3.2.8
2025-01-24 10:26 sfernandez Status assigned => feedback
2025-01-24 10:26 sfernandez Note Added: 0010288
2025-01-24 20:59 KeldorKatarn Note Added: 0010289
2025-01-24 20:59 KeldorKatarn Status feedback => assigned
2025-01-24 21:01 KeldorKatarn Note Edited: 0010289
2025-06-06 12:52 jsantos Target Version 3.2.8 => 3.2.9
2025-10-02 00:48 jsantos Target Version 3.2.9 => 3.2.10
2025-10-10 13:29 jsantos Category Unity3D => Unity
2025-10-20 18:25 jsantos Target Version 3.2.10 => 3.2.11
2026-01-20 19:32 jsantos Target Version 3.2.11 => 3.2.12
2026-03-04 00:39 jsantos Target Version 3.2.12 => 3.2.13