Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7044467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:24:47+00:00 2026-05-28T02:24:47+00:00

I start a new WPF Application and paste following code to the MainWindow.xaml <Canvas>

  • 0

I start a new WPF Application and paste following code to the MainWindow.xaml

<Canvas>
<TextBlock Text="Kammer 123" 
           MaxWidth="80"
           Padding="5, 0"
           TextWrapping="Wrap" 
           TextAlignment="Center" />
</Canvas>

The expected result is a TextBlock rendering “Kammer 123” in the upper left corner, but what I see is only “Kammer”. If I change the Text property to “Kammer 1234” or “Kammer 12” or “Kammer abc” the rendering is correct. With “Kammer 12345” the text is wrapped correctly. Is this a bug or a feature I do not understand?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:24:48+00:00Added an answer on May 28, 2026 at 2:24 am

    Very interesting bug! I can confirm your results. On Windows XP 32-bit at 96 dpi, the “123” gets cut off but other sequences render correctly. On Windows 7 64-bit at 120 dpi, all strings render correctly. So that’s indeed a WPF text layout bug, either for 96 dpi or on 32 bit.

    Some experimentation shows that the Padding line is the culprit. Remove that line or reduce horizontal padding to 1, and the text shows up correctly. An alternative would be to use Margin instead of Padding, that seems to work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose we start from the default new WPF project with App.xaml/cs , MainWindow.xaml/cs .
I start the NServisBus.host.exe file from my wpf application using the following code: System.Diagnostics.Process.Start(NServiceBus.Host.exe);
The following code causes a NullReferenceException tStartParameter = String.Format(tStartParameter, tTo, tSubject) tProcess = Process.Start(New
Start a new Silverlight application... and in the code behind (in the Loaded event),
I'm about to start on a new WPF application with a Sybase datastore. The
I want to start a new application on WPF . The new User interface
I have an WPF-Application with 3 different UserControls in the MainWindow and only one
I'm going to start a new WPF project and I'm considering to implement it
I have a simple WPF application which I am trying to start. I am
Let us suppose we are going to start new project - application that contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.