DraggableWindow.Theme.xaml
上传用户:huazai0421
上传日期:2008-05-30
资源大小:405k
文件大小:4k
源码类别:
SilverLight
开发平台:
C#
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:ESRI.ArcGIS.Samples"
- xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows">
- <Style TargetType="local:DraggableWindow">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="local:DraggableWindow">
- <Grid x:Name="RootElement">
- <vsm:VisualStateManager.VisualStateGroups>
- <vsm:VisualStateGroup x:Name="CommonStates">
- <vsm:VisualState x:Name="Normal">
- <Storyboard>
- <DoubleAnimation BeginTime="00:00:00" Storyboard.TargetName="RootElement" Storyboard.TargetProperty="Opacity" To=".75" Duration="0:0:0.1" />
- </Storyboard>
- </vsm:VisualState>
- <vsm:VisualState x:Name="MouseOver">
- <Storyboard>
- <DoubleAnimation BeginTime="00:00:00" Storyboard.TargetName="RootElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1" />
- </Storyboard>
- </vsm:VisualState>
- <vsm:VisualState x:Name="Dragging">
- <Storyboard>
- <DoubleAnimation BeginTime="00:00:00" Storyboard.TargetName="RootElement" Storyboard.TargetProperty="Opacity" To=".5" Duration="0:0:0.1" />
- </Storyboard>
- </vsm:VisualState>
- <vsm:VisualState x:Name="Focus">
- <Storyboard>
- <DoubleAnimation BeginTime="00:00:00" Storyboard.TargetName="RootElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1" />
- </Storyboard>
- </vsm:VisualState>
- </vsm:VisualStateGroup>
- </vsm:VisualStateManager.VisualStateGroups>
- <Border BorderThickness="2" Background="Black" BorderBrush="#555555" CornerRadius="3">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="20" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid x:Name="TopBar">
- <Grid.Background>
- <LinearGradientBrush x:Name="ReflectionGradient" Opacity=".5" StartPoint="0.5,0" EndPoint="0.5,1">
- <LinearGradientBrush.GradientStops>
- <GradientStop Color="#D0FFFFFF" Offset="0" />
- <GradientStop Color="#90FFFFFF" Offset="0.5" />
- <GradientStop Color="#60FFFFFF" Offset="0.5" />
- <GradientStop Color="#90FFFFFF" Offset="1" />
- </LinearGradientBrush.GradientStops>
- </LinearGradientBrush>
- </Grid.Background>
- <TextBlock Text="{TemplateBinding Title}" VerticalAlignment="Center"
- Margin="5,0,0,0"
- Foreground="White" FontWeight="Bold" FontSize="12" />
- <Button HorizontalAlignment="Right" VerticalAlignment="Center"
- Height="16" Width="15" Margin="0,0,2,0"
- x:Name="btnClose" Cursor="Hand" Padding="2"
- Style="{StaticResource darkButtonStyle}" >
- <Button.Content>
- <Image Source="/Images/CloseX.png" />
- </Button.Content>
- </Button>
- </Grid>
- <ScrollViewer Background="#333333" Grid.Row="1"
- HorizontalScrollBarVisibility="Auto"
- Margin="0" Padding="0"
- VerticalScrollBarVisibility="Auto">
- <ContentPresenter
- x:Name="contentPresenter"
- Content="{TemplateBinding Content}"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- Margin="{TemplateBinding Padding}"/>
- </ScrollViewer>
- </Grid>
- </Border>
- <Rectangle Fill="#00FFFFFF" Width="4" Cursor="Hand"
- HorizontalAlignment="Right" x:Name="ResizeWidth" />
- <Rectangle Fill="#00FFFFFF" Height="4" Cursor="Hand"
- VerticalAlignment="Bottom" x:Name="ResizeHeight" />
- <Grid.Effect>
- <DropShadowEffect Color="Black" Direction="-45" BlurRadius="20" Opacity=".75" />
- </Grid.Effect>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>