在小内容控制(wpf)中使折线显得清晰明了 [英] Make polyline appear crisp and clear in small content control (wpf)

查看:55
本文介绍了在小内容控制(wpf)中使折线显得清晰明了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有3个微小的内容控件,每个控件都有一个路径来绘制一些线条。这些需要非常小,我在线条清晰方面遇到了麻烦。这些线的笔划粗细为1,但是当我运行应用程序时,它们变得像素化并且模糊了。有人可以帮我吗?


谢谢。

< Grid Horizo​​ntalAlignment =" Left"余量= QUOT; 10,0,0,0"宽度= QUOT 11 QUOT;高度=33>


< Grid.RowDefinitions>


< RowDefinition Height =" 10" />


< RowDefinition Height =" 1" />


< RowDefinition Height =" 10" />


< RowDefinition Height =" 1" />


< RowDefinition Height =" 10" />


< /Grid.RowDefinitions>


<! - 单线连接 - >


< ContentControl Grid.Row =" 0">


< Border BorderBrush ="#FF016491"了borderThickness = QUOT; 1,1,1,1" >


< Path Stroke =" Blue" StrokeThickness =" 1">


< Path.Data>


< PathGeometry>


< PathFigure StartPoint =" 2,4">


< LineSegment Point =" 7,4" />

< / PathFigure>


< / PathGeometry>


< /Path.Data>


< / Path>


< / Border>


< / ContentControl>


<! - 一对多连接 - >


< ContentControl Grid.Row =" 2">


< Border BorderBrush ="#FF016491"了borderThickness = QUOT; 1,1,1,1" >


< Path Stroke =" Blue" StrokeThickness =" 1">


< Path.Data>


< PathGeometry>


< PathFigure StartPoint =" 2,2">


< LineSegment Point =" 5,2" />

< LineSegment Point =" 5,6" />


< LineSegment Point =" 2,6" />


< / PathFigure>


< PathFigure StartPoint =" 5,4">


< ; LineSegment Point =" 8,4" />


< / PathFigure>


< / PathGeometry>


< /Path.Data>


< / Path>


< / Border>


< / ContentControl>


<! - 多对多连接 - >


< ContentControl Grid.Row =" 4">


< Border BorderBrush ="#FF016491"了borderThickness = QUOT; 1,1,1,1" >


< Path Stroke =" Blue" StrokeThickness =" 1">


< Path.Data>


< PathGeometry>


< PathFigure StartPoint =" 0,2">


< LineSegment Point =" 3,2" />

< LineSegment Point =" 3,6" />


< LineSegment Point =" 0,6" />


< / PathFigure>


< PathFigure StartPoint =" 3,4">


< ; LineSegment Point =" 6,4" />


< / PathFigure>


< PathFigure StartPoint =" 9 ,2>>


< LineSegment Point =" 6,2" />


< LineSegment Point =" 6,6" />


< LineSegment Point =" 9,6" />


< / PathFigure>


< / PathGeometry>


< /Path.Data>


< /路径>


< / Border>


< / ContentControl>


< / Grid>


-
mo ******* @ newsgroup.nosp am

Hi, I have 3 tiny content controls and each has a Path in it to draw some lines. These need to be very small and I''m having trouble making the lines clear. the lines have a stroke thickness of "1", but when I run the app, they become pixilated and blur out. Can someone please help me on this?

Thanks.
<Grid HorizontalAlignment="Left" Margin="10,0,0,0" Width="11" Height="33">

<Grid.RowDefinitions>

<RowDefinition Height="10" />

<RowDefinition Height="1" />

<RowDefinition Height="10" />

<RowDefinition Height="1" />

<RowDefinition Height="10" />

</Grid.RowDefinitions>

<!-- Single Line Connection-->

<ContentControl Grid.Row="0">

<Border BorderBrush="#FF016491" BorderThickness="1,1,1,1" >

<Path Stroke="Blue" StrokeThickness="1">

<Path.Data>

<PathGeometry>

<PathFigure StartPoint="2,4">

<LineSegment Point="7,4"/>

</PathFigure>

</PathGeometry>

</Path.Data>

</Path>

</Border>

</ContentControl>

<!-- One to Many Connection-->

<ContentControl Grid.Row="2">

<Border BorderBrush="#FF016491" BorderThickness="1,1,1,1" >

<Path Stroke="Blue" StrokeThickness="1">

<Path.Data>

<PathGeometry>

<PathFigure StartPoint="2,2">

<LineSegment Point="5,2"/>

<LineSegment Point="5,6"/>

<LineSegment Point="2,6"/>

</PathFigure>

<PathFigure StartPoint="5,4">

<LineSegment Point="8,4"/>

</PathFigure>

</PathGeometry>

</Path.Data>

</Path>

</Border>

</ContentControl>

<!-- Many to Many Connection-->

<ContentControl Grid.Row="4">

<Border BorderBrush="#FF016491" BorderThickness="1,1,1,1" >

<Path Stroke="Blue" StrokeThickness="1">

<Path.Data>

<PathGeometry>

<PathFigure StartPoint="0,2">

<LineSegment Point="3,2"/>

<LineSegment Point="3,6"/>

<LineSegment Point="0,6"/>

</PathFigure>

<PathFigure StartPoint="3,4">

<LineSegment Point="6,4"/>

</PathFigure>

<PathFigure StartPoint="9,2">

<LineSegment Point="6,2"/>

<LineSegment Point="6,6"/>

<LineSegment Point="9,6"/>

</PathFigure>

</PathGeometry>

</Path.Data>

</Path>

</Border>

</ContentControl>

</Grid>

--
mo*******@newsgroup.nospam

推荐答案

< Path SnapsToDevicePixels =" True" .........让它更清楚吗?
Does <Path SnapsToDevicePixels="True" .........make it any clearer?


这很难说,但我不这么认为。

" Peter Morris" < mrpmorris at gmail dot comwrote in message

news:%2 **************** @ TK2MSFTNGP04.phx.gbl ...
It''s hard to tell, but I dont think so.

"Peter Morris" <mrpmorris at gmail dot comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...

< Path SnapsToDevicePixels =" True" .........让它更清楚?
Does <Path SnapsToDevicePixels="True" .........make it any clearer?



你好Moondaddy,
Hi Moondaddy,

线条的笔触粗细为1,但是当我运行应用程序时,它们是
the lines have a stroke thickness of "1", but when I run the app, they



变得像素化并模糊了。 />

我将您的示例代码粘贴到我的测试项目中并运行应用程序,但是

我没有看到线条在我身边模糊。它们非常清晰。


如果将Path元素的StokeThickness属性更改为0.5,那么这些行会变得清晰吗?


此致,

Linda Liu

Microsoft在线社区支持


让客户满意是我们的首要任务。我们欢迎您的意见和

有关我们如何改进我们为您提供的支持的建议。请

随时让我的经理知道您对服务水平的看法

提供。您可以直接向我的经理发送反馈:
ms****@microsoft.com


========================================== ========

通过电子邮件收到我的帖子通知?请参阅
http://msdn.microsoft .com / subscripti ... ult.aspx#notif

ications。


注意:MSDN托管新闻组支持服务是针对非紧急问题

如果社区或微软支持人员在1个工作日内做出初步回复是可以接受的。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

Microsoft客户支持服务(CSS)处理
href =http://msdn.microsoft.com/subscriptions/support/default.aspx\"target =_ blank> http://msdn.microsoft.com/subscripti...t/default.aspx

======================================== ==========

此帖子按原样提供。没有保证,也没有授予任何权利。

become pixilated and blur out.

I paste your sample code into my test project and run the application, but
I didn''t see the lines blur out on my side. They are very clear.

If you change the StokeThickness property of the Path elements to 0.5, will
the lines become clear?

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


这篇关于在小内容控制(wpf)中使折线显得清晰明了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆