Is your feature request related to a problem? Please describe.
I can't find any way to specify data type for compiled bindings when pointing the Source parameter at a static resource.
For example, the code snippet
TestProperty = {Binding PropertyOnResource, Source={StaticResource ExampleResourceKey}}
presents correctly in Rider, showing the correct type for the resource and property, but does not compile.
Describe the solution you'd like
Any syntax that gives does not give errors at design time or compile time. Ideally the syntax from the code sample would compile, but I understand it's possible for the type of the StaticResource to change, so the markup extension having a DataType parameter or listenning to the x:DataType attribute are also both good solutions.
Describe alternatives you've considered
In Rider, the following does not create design-time errors but also does not compile:
TestProperty = {Binding PropertyOnResource, x:DataType=ns:ResourceType, Source={StaticResource ExampleResourceKey}}
The following is a valid workaround, but creates design-time errors since DataType doesn't exist on CompiledBinding:
TestProperty = {Binding PropertyOnResource, DataType=ns:ResourceType, Source={StaticResource ExampleResourceKey}}
but does not work if you explicitly state it is a compiled binding; this fails to compile:
TestProperty = {CompiledBinding PropertyOnResource, DataType=ns:ResourceType, Source={StaticResource ExampleResourceKey}}
Is this is a hold over from how the {Binding} markup extension is handled internally?
Additional context
No response
Is your feature request related to a problem? Please describe.
I can't find any way to specify data type for compiled bindings when pointing the Source parameter at a static resource.
For example, the code snippet
presents correctly in Rider, showing the correct type for the resource and property, but does not compile.
Describe the solution you'd like
Any syntax that gives does not give errors at design time or compile time. Ideally the syntax from the code sample would compile, but I understand it's possible for the type of the StaticResource to change, so the markup extension having a DataType parameter or listenning to the x:DataType attribute are also both good solutions.
Describe alternatives you've considered
In Rider, the following does not create design-time errors but also does not compile:
The following is a valid workaround, but creates design-time errors since DataType doesn't exist on CompiledBinding:
but does not work if you explicitly state it is a compiled binding; this fails to compile:
Is this is a hold over from how the {Binding} markup extension is handled internally?
Additional context
No response