Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - How to draw "clear" text?

 
 
Old 11-20-2006   #1 (permalink)
dwbclz


 
 

How to draw "clear" text?

It seems that 'SnapsToDevicePixels' property does not
affect Label and Button.
Here is my 'XAML':

<Window SnapsToDevicePixels="True"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
<StackPanel Width="250" SnapsToDevicePixels="True" Margin="7"
Orientation="Horizontal">
<Button Content="Click Me1" SnapsToDevicePixels="True" />
<Button Content="Click Me2"/>
<Label Content="fj" FontSize="16" SnapsToDevicePixels="True"/>
<Rectangle SnapsToDevicePixels="False" Width="45.5" Margin="10"
Height="1" Fill="Red"/>
<Rectangle SnapsToDevicePixels="True" Width="45.5" Margin="10"
Height="1" Fill="Red"/>
</StackPanel>
</Window>

Rectangle with 'SnapsToDevicePixels="true"' is clear, but Label and Buttons
are blurry.




My System SpecsSystem Spec
Old 11-20-2006   #2 (permalink)
Douglas Stockwell


 
 

Re: How to draw "clear" text?

Looks fine to me. I presume you are talking about ClearType sub-pixel
rendering. You can't turn that off.

You can tweak the settings in the registry - see here:
http://forums.microsoft.com/MSDN/Sho...eID=1&PageID=1

"dwbclz" <dwbclz@discussions.microsoft.com> wrote in message
news:52E1BEAC-E2A1-4CC3-9B60-26DF5F793817@microsoft.com...
> It seems that 'SnapsToDevicePixels' property does not
> affect Label and Button.
> Here is my 'XAML':
>
> <Window SnapsToDevicePixels="True"
> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
> xmlns:sys="clr-namespace:System;assembly=mscorlib"
> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
> <StackPanel Width="250" SnapsToDevicePixels="True" Margin="7"
> Orientation="Horizontal">
> <Button Content="Click Me1" SnapsToDevicePixels="True" />
> <Button Content="Click Me2"/>
> <Label Content="fj" FontSize="16" SnapsToDevicePixels="True"/>
> <Rectangle SnapsToDevicePixels="False" Width="45.5" Margin="10"
> Height="1" Fill="Red"/>
> <Rectangle SnapsToDevicePixels="True" Width="45.5" Margin="10"
> Height="1" Fill="Red"/>
> </StackPanel>
> </Window>
>
> Rectangle with 'SnapsToDevicePixels="true"' is clear, but Label and
> Buttons
> are blurry.
>
>
>


My System SpecsSystem Spec
Old 11-21-2006   #3 (permalink)
Jan Kucera


 
 

Re: How to draw "clear" text?

Can this be turned off only for one application?
Jan

"Douglas Stockwell" <doug@remove.11011.net> wrote in message
news:C9F9D5A8-C4BB-411C-BE72-E0949D279C6A@microsoft.com...
> Looks fine to me. I presume you are talking about ClearType sub-pixel
> rendering. You can't turn that off.
>
> You can tweak the settings in the registry - see here:
> http://forums.microsoft.com/MSDN/Sho...eID=1&PageID=1
>
> "dwbclz" <dwbclz@discussions.microsoft.com> wrote in message
> news:52E1BEAC-E2A1-4CC3-9B60-26DF5F793817@microsoft.com...
>> It seems that 'SnapsToDevicePixels' property does not
>> affect Label and Button.
>> Here is my 'XAML':
>>
>> <Window SnapsToDevicePixels="True"
>> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>> xmlns:sys="clr-namespace:System;assembly=mscorlib"
>> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
>> <StackPanel Width="250" SnapsToDevicePixels="True" Margin="7"
>> Orientation="Horizontal">
>> <Button Content="Click Me1" SnapsToDevicePixels="True" />
>> <Button Content="Click Me2"/>
>> <Label Content="fj" FontSize="16" SnapsToDevicePixels="True"/>
>> <Rectangle SnapsToDevicePixels="False" Width="45.5" Margin="10"
>> Height="1" Fill="Red"/>
>> <Rectangle SnapsToDevicePixels="True" Width="45.5" Margin="10"
>> Height="1" Fill="Red"/>
>> </StackPanel>
>> </Window>
>>
>> Rectangle with 'SnapsToDevicePixels="true"' is clear, but Label and
>> Buttons
>> are blurry.
>>
>>
>>

>


My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Unable to clear "deleted items" with error message?! Vista mail
Is it possible to make a tutorial for "shortcut to clear undo/redo in explorer"? General Discussion
How to change permanently the "Text Size" under "View"? Vista mail
How to clear "save as" dialog box previously used file names Vista General
How do you clear the Desktop Background "Picture Location" History Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46