开发者

Example of FormattedText class working in WPF?

开发者 https://www.devze.com 2023-02-18 00:15 出处:网络
The code i开发者_运维百科n this link does not work for me: http://msdn.microsoft.com/en-us/library/ms752098.aspx

The code i开发者_运维百科n this link does not work for me: http://msdn.microsoft.com/en-us/library/ms752098.aspx I just created a WPF Project and added that method (overrided) in MainWindow.


Instead of overriding it on your Window, create a UserControl in the project and put the override in the code-behind for that UserControl. Then, add that UserControl to your Window.


The problem lies in the overridden OnRender method on the MainWindow. This thread adresses the problem. You would have to make the background of your MainWindow transparent in order to make it work, but it looks quite odd. It would be better to use a different control.

0

精彩评论

暂无评论...
验证码 换一张
取 消