WCAG 2.0 達成方法集

Skip to Content (Press Enter)


SL22: Supporting Browser Zoom in Silverlight


この達成方法 (参考) の使用法と、この達成方法が WCAG 2.0 達成基準 (規定) とどのように関係するのかに関する重要な情報については、WCAG 達成基準の達成方法を理解するを参照のこと。適用 (対象) のセクションは、その達成方法の範囲について説明しており、特定の技術に関する達成方法の存在は、その技術があらゆる状況で WCAG 2.0 を満たすコンテンツを作成するために使用できることを意味するものではない。

適用 (対象)

訳注: Silverlight は、2021 年 11 月にサポートを終了する計画が Microsoft 社より公表されている (Microsoft サポート - Silverlight のライフサイクルポリシー)。

WAIC では、Silverlight に関する達成方法の翻訳を行っていないが、将来もその予定がないことに留意されたい。



SL22 に関するユーザエージェントサポートノートを参照のこと。Silverlight Technology Notesも参照。


The objective of this technique is to support or anticipate existing browser zoom features effectively when users interact with the Silverlight application. This technique explains how the Silverlight content area reacts to the browser zoom feature implemented by some user agent hosts. Silverlight content and layout properties are based on physical screen pixel measurements. When the browser zoom is engaged, Silverlight content scales correctly for the zoom factor, and uses the same zoom factor as any surrounding HTML content.

Browser zoom is relevant for accessibility and Silverlight because it is likely to be the zoom /scaling feature enabled by the browser host that Web technology users are the most familiar with as a technique for increasing the text size in Web content.

Legacy behavior in Silverlight version 2

Built-in support for browser zoom was introduced as a feature in Silverlight version 3. Older documents on the Web might describe techniques that were relevant for Silverlight version 2, where dealing with browser zoom required JavaScript handling of the Resized event, and developers manually applied a ScaleTransform to Silverlight content to scale it up. Silverlight has a "quirks mode" that detects existing handlers that might still use the older techniques. Built-in zoom not active in these cases, so that applications can avoid doubling or otherwise mishandling the user agent's zooming behavior.

Deliberately disabling browser zoom in Silverlight applications

Silverlight also provides the ability to disable the built-in browser zoom handling and rendering behavior. This is sometimes done in order to suppress some of the aliasing and distortion artifacts that host-level scaling can introduce, particularly for video content or certain uses of text. In these cases, application authors might consider other Silverlight techniques for scaling the user interface, perhaps specifically only for the text elements on a page. When an application disables the built-in zoom behavior and rendering for Silverlight content, the browser still retains its zoom settings, and that setting applies to other content outside of Silverlight such as the hosting HTML.


事例 1: Verifying browser zoom, and checking the zoom factor

This example has a UI defined in XAML and logic defined in C#. The UI shows the zoom factor, and also demonstrates what happens when built-in browser zoom handling is deliberately disabled. Note that the zooming factor as reported by the API is still retained even when Silverlight built-in zoom scaling is disabled deliberately. The following is the XAML UI:

<UserControl x:Class="BrowserZoom.MainPage"
   <StackPanel x:Name="LayoutRoot" Background="White">
       <TextBlock>Some text you can zoom.</TextBlock>
       <Button Click="Button_Click">Toggle built-in zoom handling</Button>
       <StackPanel Orientation="Horizontal">
           <Button Click="Button_Click_1">Query current zoom factor</Button>
           <TextBox IsReadOnly="true" Name="zoomf"
   Text="{Binding Path=reportZoom}"/>

The following is the C# logic:

   public partial class MainPage : UserControl
       public MainPage()
       private void Button_Click(object sender, RoutedEventArgs e)
           if (!Application.Current.Host.Settings.EnableAutoZoom == false) {
           Application.Current.Host.Settings.EnableAutoZoom = false;
               Application.Current.Host.Settings.EnableAutoZoom = true;
       private void Button_Click_1(object sender, RoutedEventArgs e)
           zoomf.Text = Application.Current.Host.Content.ZoomFactor.ToString();

This example is shown in operation in the working example of Browser Zoom.





  1. Using a browser that supports Silverlight, open an HTML page that references a Silverlight application through an object tag. The browser being used for the test must support a browser zoom feature, and the feature must be turned on as a user preference.

  2. Verify that the Silverlight application enables auto zoom (no Silverlight application-specific code or markup has set EnableAutoZoom API to false).

  3. Test the zooming feature of the user agent. Verify that browser zoom factors apply to the Silverlight content.


#2 and #3 are true.