source: default/framework/trunk/WebApplication/UI/StylePriorityWithContentPlaceHolderPage.aspx.cs @ 1642

このファイルの 1642 以降における最終更新内容1642 で hizuya@… が 7ヵ月前 に更新しました
  • StyleUtility で ContentPlaceHolder を使っている場合でも正しい位置に埋め込まれるように対応。
ファイルサイズ: 2.4 KB
 
1// ----------------------------------------------------------------------------
2// <copyright company="F.C. Soft., Inc.">
3//   Copyright(c) F.C. Soft., Inc.  All rights reserved.
4// </copyright>
5// <license>
6//   Licensed to F.C. Soft., Inc. (FCSoft) under one or more contributor
7//   license agreements.  See the NOTICE file distributed with this work for
8//   additional information regarding copyright ownership.  FCSoft licenses
9//   this file to You under the Apache License, Version 2.0 (the "License");
10//   you may not use this file except in compliance with the License.  You
11//   may obtain a copy of the License at
12//
13//     http://www.apache.org/licenses/LICENSE-2.0
14//
15//   Unless required by applicable law or agreed to in writing, software
16//   distributed under the License is distributed on an "AS IS" BASIS,
17//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18//   See the License for the specific language governing permissions and
19//   limitations under the License.
20// </license>
21// ----------------------------------------------------------------------------
22
23namespace FCSoft.SilverFrost.Framework.Web.UI
24{
25    using System;
26    using System.Web.UI;
27    using System.Web.UI.WebControls;
28
29
30    /// <summary>
31    /// マスターページの <see cref="ContentPlaceHolder"/> 内でスタイルシートを読み込んでいる状態で、
32    /// <see cref="StyleUtility"/> で優先的なスタイルシートを読み込むテストです。
33    /// </summary>
34    public partial class StylePriorityWithContentPlaceHolderPage :
35        System.Web.UI.Page
36    {
37        /// <summary>
38        /// インスタンスを作成します。
39        /// </summary>
40        public StylePriorityWithContentPlaceHolderPage()
41        {
42            // AVOID
43        }
44
45        /// <summary>
46        /// <see cref="Control.Load" /> イベントを発生させます。
47        /// </summary>
48        /// <param name="e">
49        /// イベント データを格納している <see cref="EventArgs" /> オブジェクト。
50        /// </param>
51        protected override void OnLoad(EventArgs e)
52        {
53            // 親を呼び出す
54            base.OnLoad(e);
55
56            StyleUtility.RegisterClientStyleUrl(
57                this,
58                GetType(),
59                "CSS",
60                "~/Styles/test-block-2.css",
61                true);
62        }
63    }
64}
詳しい使い方は TracBrowser を参照してください。