Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BAML to XAML conversion does not generate escape sequence {} correctly #470

Closed
lextm opened this issue Jun 20, 2014 · 1 comment
Closed

Comments

@lextm
Copy link
Contributor

lextm commented Jun 20, 2014

    <UserControl.Resources>
        <Style x:Key="NumericAxisLabelStyle" TargetType="{x:Type c:NumericAxisLabel}">
            <Setter Property="Control.IsTabStop" Value="False" />
            <Setter Property="c:AxisLabel.StringFormat" Value="{}{0:0}" />
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type c:NumericAxisLabel}">
                        <TextBlock Text="{TemplateBinding c:AxisLabel.FormattedContent}" />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>

When above XAML is compiled to BAML, ILSpy fails to recover the XAML part Value="{}{0:0}" correctly. The wrong value Value="{0:0}" is provided, which is invalid.

@lextm lextm mentioned this issue Jun 20, 2014
@lextm lextm changed the title BAML to XAML conversion does not treat {} correctly BAML to XAML conversion does not generate escape sequence {} correctly Jun 20, 2014
@lextm
Copy link
Contributor Author

lextm commented Jun 20, 2014

The escape sequence is documented in http://msdn.microsoft.com/en-us/library/ms744986(v=vs.110).aspx

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant