えムナウ Blog

えムナウ の なすがまま

目次

Blog 利用状況

ニュース


follow mnow at http://twitter.com


えムナウのプログラミングのページ

INETAJ

書庫

日記カテゴリ

ギャラリ

WPF:影のいろいろ

WPFの影を比べてみました。

影

やっぱりBorderのBevelBitmapEffectは手軽で強力ですね。
レンダリングが少し遅いらしいのですが・・・

皆さんは何番がお好みですか?

<Window

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"

    x:Class="UntitledProject6.Window1"

    x:Name="Window"

    Title="Window1"

    Width="960" Height="480">

 

    <Grid x:Name="LayoutRoot">

        <Grid.ColumnDefinitions>

            <ColumnDefinition/>

            <ColumnDefinition/>

            <ColumnDefinition/>

            <ColumnDefinition/>

        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>

            <RowDefinition/>

            <RowDefinition/>

        </Grid.RowDefinitions>

        <Themes:SystemDropShadowChrome HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="200" CornerRadius="10,10,10,10">

            <Button Margin="1,1,10,10" Content=""/>

        </Themes:SystemDropShadowChrome>

        <Border HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="200" Grid.Column="1" BorderBrush="#71000000" BorderThickness="1,1,10,10" CornerRadius="10,10,10,10">

            <Button Content=""/>

        </Border>

        <Border HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="200" Grid.Column="2">

            <Border.BitmapEffect>

                <DropShadowBitmapEffect Color="#71000000" ShadowDepth="10"/>

            </Border.BitmapEffect>

            <Button Content=""/>

        </Border>

        <Border HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="200" Grid.Column="3">

            <Border.BitmapEffect>

                <OuterGlowBitmapEffect GlowColor="#71000000" GlowSize="10"/>

            </Border.BitmapEffect>

            <Button Content=""/>

        </Border>

        <Border HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="200" Grid.Column="0" Grid.Row="1">

            <Border.BitmapEffect>

                <BevelBitmapEffect BevelWidth="10" EdgeProfile="Linear" LightAngle="135"/>

            </Border.BitmapEffect>

            <Button Content=""/>

        </Border>

        <Border HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="200" Grid.Column="1" Grid.Row="1">

            <Border.BitmapEffect>

                <BevelBitmapEffect BevelWidth="10" EdgeProfile="CurvedIn" LightAngle="135"/>

            </Border.BitmapEffect>

            <Button Content=""/>

        </Border>

        <Border HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="200" Grid.Column="2" Grid.Row="1">

            <Border.BitmapEffect>

                <BevelBitmapEffect BevelWidth="10" EdgeProfile="CurvedOut" LightAngle="135"/>

            </Border.BitmapEffect>

            <Button Content=""/>

        </Border>

        <Border HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="200" Grid.Column="3" Grid.Row="1">

            <Border.BitmapEffect>

                <BevelBitmapEffect BevelWidth="10" EdgeProfile="BulgedUp" LightAngle="135"/>

            </Border.BitmapEffect>

            <Button Content=""/>

        </Border>

    </Grid>

</Window>

投稿日時 : 2007年10月28日 19:26