The following XAML results in an error that makes no sense to me
<ToggleButton
Width="400" Height="400"
Style="{StaticResource DieselToggleButton}"
Margin="50, 0, 0, 0">
<ContentControl Content="{TemplateBinding Content}"/>
</ToggleButton>
I get the following error:
Type 'TemplateBinding' used after '{' must be a Markup Extension. Error code 0x80004005.
Can somebody explain me what the problem is, and how to solve it?
Use {Binding} or {x:Bind} in your case.
Attempting to use a TemplateBinding outside of a ControlTemplate definition in XAML will result in a parser error. https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/templatebinding-markup-extension
User contributions licensed under CC BY-SA 3.0