PageRenderTime 31ms CodeModel.GetById 12ms app.highlight 10ms RepoModel.GetById 2ms app.codeStats 0ms

/V4/StockTrader RI/Desktop/StockTraderRI/Resources/Styles.xaml

#
XAML | 1240 lines | 1133 code | 84 blank | 23 comment | 0 complexity | 5d25584c8d8cd3720f7d988a893a6494 MD5 | raw file
   1<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   2    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
   3
   4    <!-- Focus Visual -->
   5
   6    <Style x:Key="ButtonFocusVisual">
   7        <Setter Property="Control.Template">
   8            <Setter.Value>
   9                <ControlTemplate>
  10                    <Border>
  11                        <Rectangle Margin="2" StrokeThickness="1" Stroke="#60000000" StrokeDashArray="1 2"/>
  12                    </Border>
  13                </ControlTemplate>
  14            </Setter.Value>
  15        </Setter>
  16    </Style>
  17
  18    <!-- Fill Brushes -->
  19
  20    <LinearGradientBrush x:Key="NormalBrush" StartPoint="0,0" EndPoint="0,1">
  21        <GradientBrush.GradientStops>
  22            <GradientStopCollection>
  23                <GradientStop Color="#FFF" Offset="0.0"/>
  24                <GradientStop Color="#CCC" Offset="1.0"/>
  25            </GradientStopCollection>
  26        </GradientBrush.GradientStops>
  27    </LinearGradientBrush>
  28
  29    <LinearGradientBrush x:Key="headerBarBG" EndPoint="0.5,1" StartPoint="0.5,0">
  30        <GradientStop Color="#FF284292"/>
  31        <GradientStop Color="#FF2175B8" Offset="0.26499998569488525"/>
  32    </LinearGradientBrush>
  33
  34    <LinearGradientBrush x:Key="sideBarHeaderBarBG" EndPoint="0.5,1" StartPoint="0.5,0">
  35        <GradientStop Color="#FF4A5470"/>
  36        <GradientStop Color="#FF576F82" Offset="0.25"/>
  37    </LinearGradientBrush>
  38
  39    <LinearGradientBrush x:Key="HorizontalNormalBrush" StartPoint="0,0" EndPoint="1,0">
  40        <GradientBrush.GradientStops>
  41            <GradientStopCollection>
  42                <GradientStop Color="#FFF" Offset="0.0"/>
  43                <GradientStop Color="#CCC" Offset="1.0"/>
  44            </GradientStopCollection>
  45        </GradientBrush.GradientStops>
  46    </LinearGradientBrush>
  47
  48    <LinearGradientBrush x:Key="LightBrush" StartPoint="0,0" EndPoint="0,1">
  49        <GradientBrush.GradientStops>
  50            <GradientStopCollection>
  51                <GradientStop Color="#FFF" Offset="0.0"/>
  52                <GradientStop Color="#444" Offset="1.0"/>
  53            </GradientStopCollection>
  54        </GradientBrush.GradientStops>
  55    </LinearGradientBrush>
  56
  57    <LinearGradientBrush x:Key="HorizontalLightBrush" StartPoint="0,0" EndPoint="1,0">
  58        <GradientBrush.GradientStops>
  59            <GradientStopCollection>
  60                <GradientStop Color="#FFF" Offset="0.0"/>
  61                <GradientStop Color="#EEE" Offset="1.0"/>
  62            </GradientStopCollection>
  63        </GradientBrush.GradientStops>
  64    </LinearGradientBrush>
  65
  66    <LinearGradientBrush x:Key="DarkBrush" StartPoint="0,0" EndPoint="0,1">
  67        <GradientBrush.GradientStops>
  68            <GradientStopCollection>
  69                <GradientStop Color="#FFF" Offset="0.0"/>
  70                <GradientStop Color="#AAA" Offset="1.0"/>
  71            </GradientStopCollection>
  72        </GradientBrush.GradientStops>
  73    </LinearGradientBrush>
  74
  75    <LinearGradientBrush x:Key="PressedBrush" StartPoint="0,0" EndPoint="0,1">
  76        <GradientBrush.GradientStops>
  77            <GradientStopCollection>
  78                <GradientStop Color="#BBB" Offset="0.0"/>
  79                <GradientStop Color="#EEE" Offset="0.1"/>
  80                <GradientStop Color="#EEE" Offset="0.9"/>
  81                <GradientStop Color="#FFF" Offset="1.0"/>
  82            </GradientStopCollection>
  83        </GradientBrush.GradientStops>
  84    </LinearGradientBrush>
  85
  86    <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
  87    <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
  88    <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFF" />
  89    <SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#CCC" />
  90
  91    <!-- Border Brushes -->
  92
  93    <LinearGradientBrush x:Key="NormalBorderBrush" StartPoint="0,0" EndPoint="0,1">
  94        <GradientBrush.GradientStops>
  95            <GradientStopCollection>
  96                <GradientStop Color="#CCC" Offset="0.0"/>
  97                <GradientStop Color="#444" Offset="1.0"/>
  98            </GradientStopCollection>
  99        </GradientBrush.GradientStops>
 100    </LinearGradientBrush>
 101
 102    <LinearGradientBrush x:Key="HorizontalNormalBorderBrush" StartPoint="0,0" EndPoint="1,0">
 103        <GradientBrush.GradientStops>
 104            <GradientStopCollection>
 105                <GradientStop Color="#CCC" Offset="0.0"/>
 106                <GradientStop Color="#444" Offset="1.0"/>
 107            </GradientStopCollection>
 108        </GradientBrush.GradientStops>
 109    </LinearGradientBrush>
 110
 111    <LinearGradientBrush x:Key="DefaultedBorderBrush" StartPoint="0,0" EndPoint="0,1">
 112        <GradientBrush.GradientStops>
 113            <GradientStopCollection>
 114                <GradientStop Color="#777" Offset="0.0"/>
 115                <GradientStop Color="#000" Offset="1.0"/>
 116            </GradientStopCollection>
 117        </GradientBrush.GradientStops>
 118    </LinearGradientBrush>
 119
 120    <LinearGradientBrush x:Key="PressedBorderBrush" StartPoint="0,0" EndPoint="0,1">
 121        <GradientBrush.GradientStops>
 122            <GradientStopCollection>
 123                <GradientStop Color="#444" Offset="0.0"/>
 124                <GradientStop Color="#888" Offset="1.0"/>
 125            </GradientStopCollection>
 126        </GradientBrush.GradientStops>
 127    </LinearGradientBrush>
 128
 129    <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />
 130    <SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />
 131    <SolidColorBrush x:Key="LightBorderBrush" Color="#AAA" />
 132
 133    <!-- Miscellaneous Brushes -->
 134
 135    <SolidColorBrush x:Key="GlyphBrush" Color="#444" />
 136    <SolidColorBrush x:Key="LightColorBrush" Color="#DDD" />
 137
 138
 139    <!-- Button -->
 140
 141    <Style TargetType="{x:Type Button}">
 142        <Setter Property="SnapsToDevicePixels" Value="true"/>
 143        <Setter Property="OverridesDefaultStyle" Value="true"/>
 144        <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
 145        <Setter Property="MinHeight" Value="23"/>
 146        <Setter Property="MinWidth" Value="75"/>
 147        <Setter Property="Template">
 148            <Setter.Value>
 149                <ControlTemplate TargetType="{x:Type Button}">
 150                    <Border 
 151            x:Name="Border"  
 152            CornerRadius="2" 
 153            BorderThickness="1"
 154            Background="{StaticResource NormalBrush}"
 155            BorderBrush="{StaticResource NormalBorderBrush}">
 156                        <ContentPresenter 
 157              Margin="2"
 158              HorizontalAlignment="Center"
 159              VerticalAlignment="Center"
 160              RecognizesAccessKey="True"/>
 161                    </Border>
 162                    <ControlTemplate.Triggers>
 163                        <Trigger Property="IsKeyboardFocused" Value="true">
 164                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DefaultedBorderBrush}" />
 165                        </Trigger>
 166                        <Trigger Property="IsDefaulted" Value="true">
 167                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DefaultedBorderBrush}" />
 168                        </Trigger>
 169                        <Trigger Property="IsMouseOver" Value="true">
 170                            <Setter TargetName="Border" Property="Background" Value="{StaticResource DarkBrush}" />
 171                        </Trigger>
 172                        <Trigger Property="IsPressed" Value="true">
 173                            <Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBrush}" />
 174                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource PressedBorderBrush}" />
 175                        </Trigger>
 176                        <Trigger Property="IsEnabled" Value="false">
 177                            <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
 178                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
 179                            <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
 180                        </Trigger>
 181                    </ControlTemplate.Triggers>
 182                </ControlTemplate>
 183            </Setter.Value>
 184        </Setter>
 185    </Style>
 186
 187
 188    <!-- TextBox -->
 189
 190    <Style x:Key="{x:Type TextBox}" TargetType="{x:Type TextBoxBase}">
 191        <Setter Property="SnapsToDevicePixels" Value="True"/>
 192        <Setter Property="OverridesDefaultStyle" Value="True"/>
 193        <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
 194        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
 195        <Setter Property="MinWidth" Value="120"/>
 196        <Setter Property="MinHeight" Value="20"/>
 197        <Setter Property="AllowDrop" Value="true"/>
 198        <Setter Property="Template">
 199            <Setter.Value>
 200                <ControlTemplate TargetType="{x:Type TextBoxBase}">
 201                    <Border 
 202            Name="Border"
 203            CornerRadius="0" 
 204            Padding="2"
 205            Background="LightGray"
 206            BorderBrush="{StaticResource SolidBorderBrush}"
 207            BorderThickness="1" >
 208                        <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
 209                    </Border>
 210                    <ControlTemplate.Triggers>
 211                        <Trigger Property="IsEnabled" Value="False">
 212                            <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}"/>
 213                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBackgroundBrush}"/>
 214                            <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
 215                        </Trigger>
 216                    </ControlTemplate.Triggers>
 217                </ControlTemplate>
 218            </Setter.Value>
 219        </Setter>
 220    </Style>
 221
 222    <!-- RichTextBox -->
 223
 224    <Style x:Key="{x:Type RichTextBox}"
 225       BasedOn="{StaticResource {x:Type TextBox}}"
 226       TargetType="{x:Type RichTextBox}">
 227        <Style.Resources>
 228            <Style x:Key="{x:Type FlowDocument}"
 229           TargetType="{x:Type FlowDocument}">
 230                <Setter Property="OverridesDefaultStyle"
 231            Value="true"/>
 232            </Style>
 233        </Style.Resources>
 234    </Style>
 235
 236    <!-- PasswordBox -->
 237
 238    <Style x:Key="{x:Type PasswordBox}" TargetType="{x:Type PasswordBox}">
 239        <Setter Property="SnapsToDevicePixels" Value="true"/>
 240        <Setter Property="OverridesDefaultStyle" Value="true"/>
 241        <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
 242        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
 243        <Setter Property="FontFamily" Value="Verdana"/>
 244        <Setter Property="PasswordChar" Value="?"/>
 245        <Setter Property="MinWidth" Value="120"/>
 246        <Setter Property="MinHeight" Value="20"/>
 247        <Setter Property="AllowDrop" Value="true"/>
 248        <Setter Property="Template">
 249            <Setter.Value>
 250                <ControlTemplate TargetType="{x:Type PasswordBox}">
 251                    <Border 
 252            Name="Border"
 253            CornerRadius="0" 
 254            Padding="2" 
 255            Background="{StaticResource DisabledBackgroundBrush}"
 256            BorderBrush="{StaticResource SolidBorderBrush}"
 257            BorderThickness="1" >
 258                        <ScrollViewer x:Name="PART_ContentHost" />
 259                    </Border>
 260                    <ControlTemplate.Triggers>
 261                        <Trigger Property="IsEnabled" Value="False">
 262                            <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}"/>
 263                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBackgroundBrush}"/>
 264                            <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
 265                        </Trigger>
 266                    </ControlTemplate.Triggers>
 267                </ControlTemplate>
 268            </Setter.Value>
 269        </Setter>
 270    </Style>
 271
 272    <!-- TabControl -->
 273
 274    <Style  TargetType="{x:Type TabControl}">
 275        <Setter Property="OverridesDefaultStyle" Value="True" />
 276        <Setter Property="SnapsToDevicePixels" Value="True" />
 277        <Setter Property="Template">
 278            <Setter.Value>
 279                <ControlTemplate TargetType="{x:Type TabControl}">
 280                    <Grid KeyboardNavigation.TabNavigation="Local">
 281                        <Grid.RowDefinitions>
 282                            <RowDefinition Height="Auto"/>
 283                            <RowDefinition Height="*"/>
 284                        </Grid.RowDefinitions>
 285                        <Border 
 286              Name="Border" 
 287              Grid.Row="1" 
 288              Background="{StaticResource WindowBackgroundBrush}" 
 289              BorderBrush="{StaticResource SolidBorderBrush}" 
 290              BorderThickness="1" 
 291              CornerRadius="2" 
 292              KeyboardNavigation.TabNavigation="Local"
 293              KeyboardNavigation.DirectionalNavigation="Contained"
 294              KeyboardNavigation.TabIndex="2" >
 295                            <ContentPresenter 
 296                Name="PART_SelectedContentHost"
 297                Margin="4"
 298                ContentSource="SelectedContent" />
 299                        </Border>
 300                        <TabPanel 
 301              Name="HeaderPanel"
 302              Grid.Row="0"
 303              Margin="1,0,0,-1" 
 304              IsItemsHost="True"
 305              KeyboardNavigation.TabIndex="1"
 306              Background="Transparent" />
 307                    </Grid>
 308                    <ControlTemplate.Triggers>
 309                        <Trigger Property="IsEnabled" Value="False">
 310                            <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
 311                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
 312                        </Trigger>
 313                    </ControlTemplate.Triggers>
 314                </ControlTemplate>
 315            </Setter.Value>
 316        </Setter>
 317    </Style>
 318
 319    <!-- TabItem -->
 320
 321    <Style TargetType="{x:Type TabItem}">
 322        <Setter Property="Template">
 323            <Setter.Value>
 324                <ControlTemplate TargetType="{x:Type TabItem}">
 325                    <Grid>
 326                        <Border 
 327            Name="Border"
 328            Margin="-1,0,0,0" 
 329            Background="{StaticResource LightBrush}"
 330            BorderBrush="{StaticResource SolidBorderBrush}" 
 331            BorderThickness="1,1,1,1" 
 332            CornerRadius="2,12,0,0" >
 333                            <ContentPresenter x:Name="ContentSite"
 334              VerticalAlignment="Center"
 335              HorizontalAlignment="Center"
 336              ContentSource="Header"
 337              Margin="12,2,12,2"
 338              RecognizesAccessKey="True"/>
 339                        </Border>
 340                    </Grid>
 341                    <ControlTemplate.Triggers>
 342                        <Trigger Property="IsSelected" Value="True">
 343                            <Setter TargetName="Border" Property="Background" Value="{StaticResource WindowBackgroundBrush}" />
 344                            <Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" />
 345                        </Trigger>
 346                        <Trigger Property="IsEnabled" Value="False">
 347                            <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
 348                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
 349                            <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
 350                        </Trigger>
 351                    </ControlTemplate.Triggers>
 352                </ControlTemplate>
 353            </Setter.Value>
 354        </Setter>
 355    </Style>
 356
 357    <!-- SideBar Styles -->
 358
 359    <Style x:Key="TextBlockSectionTitle" TargetType="TextBlock">
 360        <Setter Property="FontFamily" Value="Trebuchet MS"/>
 361        <Setter Property="FontSize" Value="11" />
 362        <Setter Property="FontWeight" Value="Normal" />
 363        <Setter Property="Foreground" Value="#FF1B75BB" />
 364        <Setter Property="HorizontalAlignment" Value="Stretch" />
 365        <Setter Property="TextWrapping" Value="Wrap" />
 366        <Setter Property="TextAlignment" Value="Left" />
 367        <Setter Property="Margin" Value="0,0,0,12" />
 368    </Style>
 369
 370    <!-- Shell Boxes -->
 371    <Style x:Key="ShelBoxStyle" TargetType="Border">
 372        <Setter Property="Background" Value="#99FFFFFF" />
 373        <Setter Property="Opacity" Value="0.8" />
 374        <Setter Property="CornerRadius" Value="12,12,12,12" />
 375        <Setter Property="VerticalAlignment" Value="Stretch" />
 376    </Style>
 377
 378    <!-- ListView -->
 379
 380    <Style x:Key="{x:Static GridView.GridViewScrollViewerStyleKey}" TargetType="{x:Type ScrollViewer}">
 381        <Setter Property="Template">
 382            <Setter.Value>
 383                <ControlTemplate TargetType="{x:Type ScrollViewer}">
 384                    <Grid Background="{TemplateBinding Background}">
 385                        <Grid.ColumnDefinitions>
 386                            <ColumnDefinition Width="*"/>
 387                            <ColumnDefinition Width="Auto"/>
 388                        </Grid.ColumnDefinitions>
 389                        <Grid.RowDefinitions>
 390                            <RowDefinition Height="*"/>
 391                            <RowDefinition Height="Auto"/>
 392                        </Grid.RowDefinitions>
 393
 394                        <DockPanel Margin="{TemplateBinding Padding}">
 395                            <ScrollViewer DockPanel.Dock="Top"
 396              HorizontalScrollBarVisibility="Hidden"
 397              VerticalScrollBarVisibility="Hidden"
 398              Focusable="false">
 399                                <Border CornerRadius="4" Background="{StaticResource DefaultedBorderBrush}" Padding="4" Margin="0,4,0,4">
 400                                    <GridViewHeaderRowPresenter Margin="2,0,2,0"
 401                Columns="{Binding Path=TemplatedParent.View.Columns,RelativeSource={RelativeSource TemplatedParent}}"
 402                ColumnHeaderContainerStyle="{Binding Path=TemplatedParent.View.ColumnHeaderContainerStyle,RelativeSource={RelativeSource TemplatedParent}}"
 403                ColumnHeaderTemplate="{Binding Path=TemplatedParent.View.ColumnHeaderTemplate,RelativeSource={RelativeSource TemplatedParent}}"
 404                ColumnHeaderTemplateSelector="{Binding Path=TemplatedParent.View.ColumnHeaderTemplateSelector,RelativeSource={RelativeSource TemplatedParent}}"
 405                AllowsColumnReorder="{Binding Path=TemplatedParent.View.AllowsColumnReorder,RelativeSource={RelativeSource TemplatedParent}}"
 406                ColumnHeaderContextMenu="{Binding Path=TemplatedParent.View.ColumnHeaderContextMenu,RelativeSource={RelativeSource TemplatedParent}}"
 407                ColumnHeaderToolTip="{Binding Path=TemplatedParent.View.ColumnHeaderToolTip,RelativeSource={RelativeSource TemplatedParent}}"
 408                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
 409                                </Border>
 410
 411                            </ScrollViewer>
 412
 413                            <ScrollContentPresenter Name="PART_ScrollContentPresenter"
 414              KeyboardNavigation.DirectionalNavigation="Local"/>
 415                        </DockPanel>
 416
 417                        <ScrollBar Name="PART_HorizontalScrollBar"
 418            Orientation="Horizontal"
 419            Grid.Row="1"
 420            Maximum="{TemplateBinding ScrollableWidth}"
 421            ViewportSize="{TemplateBinding ViewportWidth}"
 422            Value="{TemplateBinding HorizontalOffset}"
 423            Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
 424
 425                        <ScrollBar Name="PART_VerticalScrollBar"
 426            Grid.Column="1"
 427            Maximum="{TemplateBinding ScrollableHeight}"
 428            ViewportSize="{TemplateBinding ViewportHeight}"
 429            Value="{TemplateBinding VerticalOffset}"
 430            Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
 431
 432                    </Grid>
 433                </ControlTemplate>
 434            </Setter.Value>
 435        </Setter>
 436    </Style>
 437
 438    <Style x:Key="GridViewColumnHeaderGripper" TargetType="{x:Type Thumb}">
 439        <Setter Property="Width" Value="18"/>
 440        <Setter Property="Background" Value="#404040"/>
 441        <Setter Property="Template">
 442            <Setter.Value>
 443                <ControlTemplate TargetType="{x:Type Thumb}">
 444                    <Border Padding="{TemplateBinding Padding}" Background="Transparent">
 445                        <Rectangle HorizontalAlignment="Center" Width="1" Fill="{TemplateBinding Background}"/>
 446                    </Border>
 447                </ControlTemplate>
 448            </Setter.Value>
 449        </Setter>
 450    </Style>
 451
 452    <Style x:Key="{x:Type GridViewColumnHeader}" TargetType="{x:Type GridViewColumnHeader}">
 453        <Setter Property="HorizontalContentAlignment" Value="Center"/>
 454        <Setter Property="VerticalContentAlignment" Value="Center"/>
 455        <Setter Property="Foreground" Value="#ffffff"/>
 456        <Setter Property="Template">
 457            <Setter.Value>
 458                <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
 459                    <Grid>
 460                        <Border Name="HeaderBorder" BorderThickness="0,1,0,1" BorderBrush="{x:Null}" Background="{x:Null}" Padding="2,0,2,0">
 461                            <ContentPresenter Name="HeaderContent" Margin="0,0,0,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
 462                        </Border>
 463                        <Thumb x:Name="PART_HeaderGripper" HorizontalAlignment="Right" Margin="0,0,-9,0" Style="{StaticResource GridViewColumnHeaderGripper}" Foreground="#FFFFFFFF" Background="{x:Null}"/>
 464                    </Grid>
 465                    <ControlTemplate.Triggers>
 466                        <Trigger Property="IsMouseOver" Value="true">
 467                            <Setter Property="Background" TargetName="PART_HeaderGripper" Value="{x:Null}"/>
 468                            <Setter Property="Foreground" TargetName="PART_HeaderGripper" Value="#FFFCFCFC"/>
 469                            <Setter Property="Background" TargetName="HeaderBorder" Value="{x:Null}"/>
 470                        </Trigger>
 471                        <Trigger Property="IsPressed" Value="true">
 472                            <Setter TargetName="HeaderContent" Property="Margin" Value="1,1,0,0"/>
 473                            <Setter Property="Foreground" TargetName="PART_HeaderGripper" Value="#FFE0E0E0"/>
 474                            <Setter Property="Background" TargetName="PART_HeaderGripper" Value="{x:Null}"/>
 475                            <Setter Property="Background" TargetName="HeaderBorder" Value="{x:Null}"/>
 476                        </Trigger>
 477                        <Trigger Property="IsEnabled" Value="false">
 478                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
 479                            <Setter Property="Background" TargetName="PART_HeaderGripper" Value="{x:Null}"/>
 480                        </Trigger>
 481                    </ControlTemplate.Triggers>
 482                </ControlTemplate>
 483            </Setter.Value>
 484        </Setter>
 485        <Style.Triggers>
 486            <Trigger Property="Role" Value="Floating">
 487                <Setter Property="Opacity" Value="0.7"/>
 488                <Setter Property="Template">
 489                    <Setter.Value>
 490                        <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
 491                            <Canvas Name="PART_FloatingHeaderCanvas">
 492                                <Rectangle Fill="#60000000" Width="{TemplateBinding ActualWidth}" Height="{TemplateBinding ActualHeight}"/>
 493                            </Canvas>
 494                        </ControlTemplate>
 495                    </Setter.Value>
 496                </Setter>
 497                <Setter Property="Foreground" Value="#FFFFFFFF"/>
 498                <Setter Property="Background" Value="{x:Null}"/>
 499            </Trigger>
 500            <Trigger Property="Role" Value="Padding">
 501                <Setter Property="Template">
 502                    <Setter.Value>
 503                        <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
 504                            <Border Name="HeaderBorder" BorderThickness="0,1,0,1" BorderBrush="#404040" Background="{x:Null}"/>
 505                        </ControlTemplate>
 506                    </Setter.Value>
 507                </Setter>
 508                <Setter Property="Foreground" Value="#FFFFFFFF"/>
 509                <Setter Property="Background" Value="{x:Null}"/>
 510                <Setter Property="BorderBrush" Value="{x:Null}"/>
 511            </Trigger>
 512        </Style.Triggers>
 513    </Style>
 514
 515    <Style x:Key="{x:Type ListView}" TargetType="{x:Type ListView}">
 516        <Setter Property="SnapsToDevicePixels" Value="true"/>
 517        <Setter Property="OverridesDefaultStyle" Value="true"/>
 518        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
 519        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
 520        <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
 521        <Setter Property="VerticalContentAlignment" Value="Center"/>
 522        <Setter Property="Template">
 523            <Setter.Value>
 524                <ControlTemplate TargetType="{x:Type ListView}">
 525                    <Border Name="Border"  BorderThickness="1" BorderBrush="{x:Null}" Background="{x:Null}">
 526                        <ScrollViewer Style="{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}" Foreground="#FFFFFFFF">
 527                            <ItemsPresenter />
 528                        </ScrollViewer>
 529                    </Border>
 530                    <ControlTemplate.Triggers>
 531                        <Trigger Property="IsGrouping" Value="true">
 532                            <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
 533                        </Trigger>
 534                        <Trigger Property="IsEnabled" Value="false">
 535                            <Setter TargetName="Border" Property="Background" Value="#AAAAAA"/>
 536                        </Trigger>
 537                    </ControlTemplate.Triggers>
 538                </ControlTemplate>
 539            </Setter.Value>
 540        </Setter>
 541    </Style>
 542
 543    <Style x:Key="{x:Type ListViewItem}" TargetType="{x:Type ListViewItem}">
 544        <Setter Property="SnapsToDevicePixels" Value="true"/>
 545        <Setter Property="OverridesDefaultStyle" Value="true"/>
 546        <Setter Property="HorizontalContentAlignment" Value="Center" />
 547        <Setter Property="VerticalContentAlignment" Value="Center" />
 548        <Setter Property="Foreground" Value="#000000"/>
 549
 550        <Setter Property="Template">
 551            <Setter.Value>
 552                <ControlTemplate TargetType="{x:Type ListBoxItem}">
 553                    <Border Name="Border" Padding="2" SnapsToDevicePixels="true"  CornerRadius="4" Margin="0,4,0,0">
 554                        <GridViewRowPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
 555                    </Border>
 556                    <ControlTemplate.Triggers>
 557                        <Trigger Property="ItemsControl.AlternationIndex" Value="0">
 558                            <Setter Property="Background" TargetName="Border"  Value="#A5FFFFFF"></Setter>
 559                        </Trigger>
 560                        <Trigger Property="ItemsControl.AlternationIndex" Value="1">
 561                            <Setter Property="Background" TargetName="Border"  Value="#01FFFFFF"></Setter>
 562                        </Trigger>
 563                        <Trigger Property="IsSelected" Value="true">
 564                            <Setter Property="Background" TargetName="Border" Value="#99B4C6"/>
 565                            <Setter Property="Foreground" Value="#000000"/>
 566                        </Trigger>
 567                        <Trigger Property="IsMouseOver" Value="true">
 568                            <Setter Property="Background" TargetName="Border" Value="#c5d7e5"/>
 569                            <Setter Property="Foreground" Value="#000000"/>
 570                        </Trigger>
 571                        <Trigger Property="IsEnabled" Value="false">
 572                            <Setter Property="Foreground" Value="#000000"/>
 573                        </Trigger>
 574                    </ControlTemplate.Triggers>
 575                </ControlTemplate>
 576            </Setter.Value>
 577        </Setter>
 578    </Style>
 579
 580    <!-- ComboBox -->
 581
 582    <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
 583        <Grid>
 584            <Grid.ColumnDefinitions>
 585                <ColumnDefinition />
 586                <ColumnDefinition Width="20" />
 587            </Grid.ColumnDefinitions>
 588            <Border
 589        x:Name="Border" 
 590        Grid.ColumnSpan="2"
 591        CornerRadius="0,0,0,0"
 592        Background="{DynamicResource SelectedBackgroundBrush}"
 593        BorderBrush="{DynamicResource DisabledForegroundBrush}"
 594        BorderThickness="1" />
 595            <Border 
 596        Grid.Column="0"
 597        CornerRadius="0,0,0,0" 
 598        Margin="1" 
 599        Background="{DynamicResource SelectedBackgroundBrush}" 
 600        BorderBrush="{DynamicResource DisabledBorderBrush}"
 601        BorderThickness="0,0,1,0" />
 602            <Path 
 603        x:Name="Arrow"
 604        Grid.Column="1"     
 605        Fill="{StaticResource GlyphBrush}"
 606        HorizontalAlignment="Center"
 607        VerticalAlignment="Center"
 608        Data="M 0 0 L 4 4 L 8 0 Z"/>
 609        </Grid>
 610        <ControlTemplate.Triggers>
 611            <Trigger Property="ToggleButton.IsMouseOver" Value="true">
 612                <Setter Property="Background" TargetName="Border" Value="{DynamicResource SolidBorderBrush}"/>
 613            </Trigger>
 614            <Trigger Property="ToggleButton.IsChecked" Value="true">
 615                <Setter Property="Background" TargetName="Border" Value="{DynamicResource PressedBrush}"/>
 616            </Trigger>
 617            <Trigger Property="IsEnabled" Value="False">
 618                <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
 619                <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
 620                <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
 621                <Setter TargetName="Arrow" Property="Fill" Value="{StaticResource DisabledForegroundBrush}" />
 622            </Trigger>
 623        </ControlTemplate.Triggers>
 624    </ControlTemplate>
 625
 626    <ControlTemplate x:Key="ComboBoxTextBox" TargetType="{x:Type TextBox}">
 627        <Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}" />
 628    </ControlTemplate>
 629
 630    <Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}">
 631        <Setter Property="SnapsToDevicePixels" Value="true"/>
 632        <Setter Property="OverridesDefaultStyle" Value="true"/>
 633        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
 634        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
 635        <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
 636        <Setter Property="MinWidth" Value="120"/>
 637        <Setter Property="MinHeight" Value="20"/>
 638        <Setter Property="Template">
 639            <Setter.Value>
 640                <ControlTemplate TargetType="{x:Type ComboBox}">
 641                    <Grid>
 642                        <Grid.Background>
 643                            <DrawingBrush Viewbox="0,0,20,20" ViewboxUnits="Absolute">
 644                                <DrawingBrush.Drawing>
 645                                    <DrawingGroup>
 646                                        <GeometryDrawing Brush="#FFD3D3D3">
 647                                            <GeometryDrawing.Geometry>
 648                                                <RectangleGeometry Rect="0,0,20,20"/>
 649                                            </GeometryDrawing.Geometry>
 650                                        </GeometryDrawing>
 651                                        <GeometryDrawing Brush="#FF000000">
 652                                            <GeometryDrawing.Geometry>
 653                                                <EllipseGeometry Center="0,0" RadiusX="10" RadiusY="10"/>
 654                                            </GeometryDrawing.Geometry>
 655                                        </GeometryDrawing>
 656                                        <GeometryDrawing Brush="#FF000000">
 657                                            <GeometryDrawing.Geometry>
 658                                                <EllipseGeometry Center="20,20" RadiusX="10" RadiusY="10"/>
 659                                            </GeometryDrawing.Geometry>
 660                                        </GeometryDrawing>
 661                                        <GeometryDrawing Brush="#FFFFFFFF">
 662                                            <GeometryDrawing.Geometry>
 663                                                <EllipseGeometry Center="20,0" RadiusX="10" RadiusY="10"/>
 664                                            </GeometryDrawing.Geometry>
 665                                        </GeometryDrawing>
 666                                        <GeometryDrawing Brush="#FFFFFFFF">
 667                                            <GeometryDrawing.Geometry>
 668                                                <EllipseGeometry Center="0,20" RadiusX="10" RadiusY="10"/>
 669                                            </GeometryDrawing.Geometry>
 670                                        </GeometryDrawing>
 671                                    </DrawingGroup>
 672                                </DrawingBrush.Drawing>
 673                            </DrawingBrush>
 674                        </Grid.Background>
 675                        <ToggleButton 
 676              Name="ToggleButton" 
 677              Template="{StaticResource ComboBoxToggleButton}" 
 678              Grid.Column="2" 
 679              Focusable="false"
 680              IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
 681              ClickMode="Press">
 682                        </ToggleButton>
 683                        <ContentPresenter
 684              Name="ContentSite"
 685              IsHitTestVisible="False" 
 686              Content="{TemplateBinding SelectionBoxItem}"
 687              ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
 688              ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
 689              Margin="3,3,23,3"
 690              VerticalAlignment="Center"
 691              HorizontalAlignment="Left" />
 692                        <TextBox x:Name="PART_EditableTextBox"
 693              Style="{x:Null}" 
 694              Template="{StaticResource ComboBoxTextBox}" 
 695              HorizontalAlignment="Left" 
 696              VerticalAlignment="Center" 
 697              Margin="3,3,23,3"
 698              Focusable="True" 
 699              Background="Transparent"
 700              Visibility="Hidden"
 701              IsReadOnly="{TemplateBinding IsReadOnly}"/>
 702                        <Popup 
 703              Name="Popup"
 704              Placement="Bottom"
 705              IsOpen="{TemplateBinding IsDropDownOpen}"
 706              AllowsTransparency="True" 
 707              Focusable="False"
 708              PopupAnimation="Slide">
 709                            <Grid 
 710                Name="DropDown"
 711                SnapsToDevicePixels="True"                
 712                MinWidth="{TemplateBinding ActualWidth}"
 713                MaxHeight="{TemplateBinding MaxDropDownHeight}">
 714                                <Border 
 715                  x:Name="DropDownBorder"
 716                  BorderThickness="1"
 717                  BorderBrush="{StaticResource SolidBorderBrush}" Background="{DynamicResource SelectedBackgroundBrush}"/>
 718                                <ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
 719                                    <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
 720                                </ScrollViewer>
 721                            </Grid>
 722                        </Popup>
 723                    </Grid>
 724                    <ControlTemplate.Triggers>
 725                        <Trigger Property="HasItems" Value="false">
 726                            <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
 727                        </Trigger>
 728                        <Trigger Property="IsEnabled" Value="false">
 729                            <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
 730                        </Trigger>
 731                        <Trigger Property="IsGrouping" Value="true">
 732                            <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
 733                        </Trigger>
 734                        <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="true">
 735                            <Setter TargetName="DropDownBorder" Property="CornerRadius" Value="0"/>
 736                            <Setter TargetName="DropDownBorder" Property="Margin" Value="0,2,0,0"/>
 737                        </Trigger>
 738                        <Trigger Property="IsEditable"
 739                 Value="true">
 740                            <Setter Property="IsTabStop" Value="false"/>
 741                            <Setter TargetName="PART_EditableTextBox" Property="Visibility"	Value="Visible"/>
 742                            <Setter TargetName="ContentSite" Property="Visibility" Value="Hidden"/>
 743                        </Trigger>
 744                    </ControlTemplate.Triggers>
 745                </ControlTemplate>
 746            </Setter.Value>
 747        </Setter>
 748        <Style.Triggers>
 749        </Style.Triggers>
 750    </Style>
 751
 752    <!-- ComboBoxItem -->
 753
 754    <Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}">
 755        <Setter Property="SnapsToDevicePixels" Value="true"/>
 756        <Setter Property="OverridesDefaultStyle" Value="true"/>
 757        <Setter Property="Template">
 758            <Setter.Value>
 759                <ControlTemplate TargetType="{x:Type ComboBoxItem}">
 760                    <Border 
 761            Name="Border"
 762            Padding="2"
 763            SnapsToDevicePixels="true">
 764                        <ContentPresenter />
 765                    </Border>
 766                    <ControlTemplate.Triggers>
 767                        <Trigger Property="IsHighlighted" Value="true">
 768                            <Setter Property="Background" TargetName="Border" Value="#FFC5D7E5"/>
 769                        </Trigger>
 770                        <Trigger Property="IsEnabled" Value="false">
 771                            <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
 772                        </Trigger>
 773                    </ControlTemplate.Triggers>
 774                </ControlTemplate>
 775            </Setter.Value>
 776        </Setter>
 777    </Style>
 778
 779    <!-- Expander -->
 780
 781    <ControlTemplate x:Key="ExpanderToggleButton" TargetType="{x:Type ToggleButton}">
 782        <Border
 783      Name="Border" 
 784      CornerRadius="0,0,0,0"
 785      Background="{x:Null}"
 786      BorderBrush="{x:Null}"
 787      BorderThickness="0,0,1,0">
 788            <Path 
 789        Name="Arrow"
 790        Fill="#FF4682B4"
 791        HorizontalAlignment="Center"
 792        VerticalAlignment="Center"
 793        Data="M 0 0 L 4 4 L 8 0 Z"/>
 794        </Border>
 795        <ControlTemplate.Triggers>
 796            <Trigger Property="ToggleButton.IsMouseOver" Value="true">
 797                <Setter Property="Background" TargetName="Border" Value="{x:Null}"/>
 798                <Setter Property="Fill" TargetName="Arrow" Value="#FF060606"/>
 799            </Trigger>
 800            <Trigger Property="IsPressed" Value="true">
 801                <Setter Property="Background" TargetName="Border" Value="{x:Null}"/>
 802                <Setter Property="Fill" TargetName="Arrow" Value="#FF093E6A"/>
 803            </Trigger>
 804            <Trigger Property="IsChecked" Value="true">
 805                <Setter TargetName="Arrow" Property="Data" Value="M 0 4 L 4 0 L 8 4 Z" />
 806                <Setter Property="Fill" TargetName="Arrow" Value="#FF093E6A"/>
 807            </Trigger>
 808            <Trigger Property="IsEnabled" Value="False">
 809                <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
 810                <Setter TargetName="Arrow" Property="Fill" Value="{StaticResource DisabledForegroundBrush}" />
 811                <Setter Property="Background" TargetName="Border" Value="{x:Null}"/>
 812                <Setter Property="BorderBrush" TargetName="Border" Value="{x:Null}"/>
 813            </Trigger>
 814        </ControlTemplate.Triggers>
 815    </ControlTemplate>
 816
 817    <Style TargetType="{x:Type Expander}">
 818        <Setter Property="Template">
 819            <Setter.Value>
 820                <ControlTemplate TargetType="{x:Type Expander}">
 821                    <Grid>
 822                        <Grid.RowDefinitions>
 823                            <RowDefinition Height="Auto"/>
 824                            <RowDefinition Name="ContentRow" Height="Auto"/>
 825                        </Grid.RowDefinitions>
 826                        <Border 
 827              Name="Border" 
 828              Grid.Row="0" 
 829              Background="{x:Null}"
 830              BorderBrush="{x:Null}"
 831              BorderThickness="1" 
 832              CornerRadius="0,0,0,0" >
 833                            <Grid>
 834                                <Grid.ColumnDefinitions>
 835                                    <ColumnDefinition Width="20" />
 836                                    <ColumnDefinition Width="*" />
 837                                </Grid.ColumnDefinitions>
 838                                <ToggleButton
 839                  IsChecked="{Binding Path=IsExpanded,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
 840                  OverridesDefaultStyle="True" 
 841                  Template="{StaticResource ExpanderToggleButton}" 
 842                  Background="#FF4682B4" />
 843                                <ContentPresenter 
 844                  Grid.Column="1"
 845                  Margin="4" 
 846                  ContentSource="Header" 
 847                  RecognizesAccessKey="True" />
 848                            </Grid>
 849                        </Border>
 850                        <Border 
 851              Name="Content" 
 852              Grid.Row="1" 
 853              Background="{x:Null}"
 854              BorderBrush="{x:Null}" 
 855              BorderThickness="1,0,1,1" 
 856              CornerRadius="0,0,2,2" >
 857                            <ContentPresenter Margin="4" />
 858                        </Border>
 859                    </Grid>
 860                    <ControlTemplate.Triggers>
 861                        <Trigger Property="IsExpanded" Value="False">
 862                            <Setter TargetName="Content" Property="Visibility" Value="Collapsed" />
 863                        </Trigger>
 864                        <Trigger Property="IsEnabled" Value="False">
 865                            <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
 866                            <Setter Property="Background" TargetName="Border" Value="{DynamicResource DisabledBorderBrush}"/>
 867                            <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource DisabledForegroundBrush}"/>
 868                        </Trigger>
 869
 870                    </ControlTemplate.Triggers>
 871                </ControlTemplate>
 872            </Setter.Value>
 873        </Setter>
 874    </Style>
 875
 876    <!-- Focus Visual -->
 877
 878    <Style x:Key="RadioButtonFocusVisual">
 879        <Setter Property="Control.Template">
 880            <Setter.Value>
 881                <ControlTemplate>
 882                    <Border>
 883                        <Rectangle 
 884              Margin="15,0,0,0"
 885              StrokeThickness="1"
 886              Stroke="#60000000"
 887              StrokeDashArray="1 2"/>
 888                    </Border>
 889                </ControlTemplate>
 890            </Setter.Value>
 891        </Setter>
 892    </Style>
 893
 894    <!-- RadioButton -->
 895
 896    <Style x:Key="{x:Type RadioButton}" TargetType="{x:Type RadioButton}">
 897        <Setter Property="SnapsToDevicePixels" Value="true"/>
 898        <Setter Property="OverridesDefaultStyle" Value="true"/>
 899        <Setter Property="FocusVisualStyle"	Value="{StaticResource RadioButtonFocusVisual}"/>
 900        <Setter Property="Template">
 901            <Setter.Value>
 902                <ControlTemplate TargetType="{x:Type RadioButton}">
 903                    <BulletDecorator Background="Transparent">
 904                        <BulletDecorator.Bullet>
 905                            <Grid Width="13" 
 906                Height="13" >
 907                                <Ellipse x:Name="Border"  
 908                  Fill="{StaticResource NormalBrush}"
 909                  StrokeThickness="1"
 910                  Stroke="{StaticResource NormalBorderBrush}" />
 911                                <Path Height="8" x:Name="CheckMark" Width="8" Opacity="1" Fill="{StaticResource GlyphBrush}"
 912				   Stretch="Fill" 
 913				   Data="M102.03442,598.79645 L105.22962,597.78918 L106.78825,600.42358 C106.78825,600.42358 108.51028,595.74304 110.21724,593.60419 C112.00967,591.35822 114.89314,591.42316 114.89314,591.42316 C114.89314,591.42316 112.67844,593.42645 111.93174,594.44464 C110.7449,596.06293 107.15683,604.13837 107.15683,604.13837 z" 
 914				   Canvas.ZIndex="1"/>
 915                            </Grid>
 916                        </BulletDecorator.Bullet>
 917                        <ContentPresenter 
 918              Margin="4,0,0,0"
 919              VerticalAlignment="Center"
 920              HorizontalAlignment="Left"
 921              RecognizesAccessKey="True"/>
 922                    </BulletDecorator>
 923                    <ControlTemplate.Triggers>
 924                        <Trigger Property="IsChecked" Value="false">
 925                            <Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
 926                        </Trigger>
 927                        <Trigger Property="IsMouseOver" Value="true">
 928                            <Setter TargetName="Border" Property="Fill" Value="{StaticResource DarkBrush}" />
 929                        </Trigger>
 930                        <Trigger Property="IsPressed" Value="true">
 931                            <Setter TargetName="Border" Property="Fill" Value="{StaticResource PressedBrush}" />
 932                            <Setter TargetName="Border" Property="Stroke" Value="{StaticResource GlyphBrush}" />
 933                        </Trigger>
 934                        <Trigger Property="IsEnabled" Value="false">
 935                            <Setter TargetName="Border" Property="Fill" Value="{StaticResource DisabledBackgroundBrush}" />
 936                            <Setter TargetName="Border" Property="Stroke" Value="#40000000" />
 937                            <Setter Property="Foreground" Value="#80000000"/>
 938                        </Trigger>
 939                    </ControlTemplate.Triggers>
 940                </ControlTemplate>
 941            </Setter.Value>
 942        </Setter>
 943    </Style>
 944
 945    <!-- Custom TextBox -->
 946
 947    <Style x:Key="CustomTextBoxStyle" TargetType="{x:Type TextBoxBase}">
 948        <Setter Property="SnapsToDevicePixels" Value="True"/>
 949        <Setter Property="OverridesDefaultStyle" Value="True"/>
 950        <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
 951        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
 952        <Setter Property="Foreground" Value="#ffffff"/>
 953        <Setter Property="MinWidth" Value="120"/>
 954        <Setter Property="MinHeight" Value="30"/>
 955        <Setter Property="AllowDrop" Value="true"/>
 956        <Setter Property="Template">
 957            <Setter.Value>
 958                <ControlTemplate TargetType="{x:Type TextBoxBase}">
 959                    <Border 
 960            Name="Border"
 961            CornerRadius="12" 
 962            Padding="5"
 963            Background="Transparent"
 964            BorderBrush="#ffffff"
 965            BorderThickness="1" >
 966                        <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
 967                    </Border>
 968                    <ControlTemplate.Triggers>
 969                        <Trigger Property="IsEnabled" Value="False">
 970                            <Setter TargetName="Border" Property="Background" Value="Transparent"/>
 971                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBackgroundBrush}"/>
 972                            <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
 973                        </Trigger>
 974                    </ControlTemplate.Triggers>
 975                </ControlTemplate>
 976            </Setter.Value>
 977        </Setter>
 978    </Style>
 979
 980    <!-- Popup TextBox -->
 981
 982    <Style x:Key="PopupTextBoxStyle" TargetType="TextBoxBase">
 983        <Setter Property="SnapsToDevicePixels" Value="True"/>
 984        <Setter Property="OverridesDefaultStyle" Value="True"/>
 985        <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
 986        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
 987        <Setter Property="Foreground" Value="#FF000000"/>
 988        <Setter Property="MinWidth" Value="120"/>
 989        <Setter Property="MinHeight" Value="30"/>
 990        <Setter Property="AllowDrop" Value="true"/>
 991        <Setter Property="Template">
 992            <Setter.Value>
 993                <ControlTemplate TargetType="{x:Type TextBoxBase}">
 994                    <Border 
 995                        Name="Border"
 996                        CornerRadius="2" 
 997                        Padding="5"
 998                        Background="Transparent"
 999                        BorderBrush="Transparent"            
1000                        BorderThickness="1">
1001                        <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
1002                    </Border>
1003                    <ControlTemplate.Triggers>
1004                        <Trigger Property="IsEnabled" Value="False">
1005                            <Setter TargetName="Border" Property="Background" Value="Transparent"/>
1006                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBackgroundBrush}"/>
1007                            <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
1008                        </Trigger>
1009                    </ControlTemplate.Triggers>
1010                </ControlTemplate>
1011            </Setter.Value>
1012        </Setter>
1013    </Style>
1014
1015
1016    <!-- Buy/Sell Grid buttons -->
1017
1018    <ControlTemplate x:Key="AddButtonTemplate" TargetType="Button">
1019        <Border Width="18" Height="18" Background="#00000000" Margin="2,0,2,0">
1020            <Grid>
1021                <Path x:Name="path1" Height="16" Width="16" RenderTransformOrigin="0.5,0.5" Fill="{x:Null}" Stretch="Fill" Stroke="#FF8C8C8C" StrokeThickness="1" Data="M7.5,1.5 L10.5,1.5 L10.5,7.5 L16.5,7.5 L16.5,10.5 L10.5,10.5 L10.5,16.5 L7.5,16.5 L7.5,10.5 L1.5,10.5 L1.5,7.5 L7.5,7.5 z" Margin="1,-1,1,3">
1022                    <Path.RenderTransform>
1023                        <TransformGroup>
1024                            <ScaleTransform/>
1025                            <SkewTransform/>
1026                            <RotateTransform Angle="-90"/>
1027                            <TranslateTransform Y="2" X="0"/>
1028                        </TransformGroup>
1029                    </Path.RenderTransform>
1030                </Path>
1031                <Path x:Name="path" Height="16" Width="16" RenderTransformOrigin="0.5,0.5" Fill="#FF032E9C" Stretch="Fill" Data="M7.5,1.5 L10.5,1.5 L10.5,7.5 L16.5,7.5 L16.5,10.5 L10.5,10.5 L10.5,16.5 L7.5,16.5 L7.5,10.5 L1.5,10.5 L1.5,7.5 L7.5,7.5 z" StrokeThickness="0" Margin="1,-1,1,3">
1032                    <Path.RenderTransform>
1033                        <TransformGroup>
1034                            <ScaleTransform/>
1035                            <SkewTransform/>
1036                            <RotateTransform Angle="-90"/>
1037                            <TranslateTransform Y="2" X="0"/>
1038                        </TransformGroup>
1039                    </Path.RenderTransform>
1040                </Path>
1041            </Grid>
1042        </Border>
1043        <ControlTemplate.Triggers>
1044            <Trigger Property="IsMouseOver" Value="True">
1045                <Setter TargetName="path1" Property="Visibility" Value="Collapsed" />
1046                <Setter TargetName="path" Property="Visibility" Value="Visible" />
1047            </Trigger>
1048            <Trigger Property="IsMouseOver" Value="False">
1049                <Setter TargetName="path1" Property="Visibility" Value="Visible" />
1050                <Setter TargetName="path" Property="Visibility" Value="Collapsed" />
1051            </Trigger>
1052        </ControlTemplate.Triggers>
1053    </ControlTemplate>
1054
1055    <ControlTemplate x:Key="RemoveXButtonTemplate" TargetType="Button">
1056        <Border Width="18" Height="18" Background="#00000000" Margin="2,0,2,0">
1057            <Grid RenderTransformOrigin="0.5,0.5">
1058                <Grid.RenderTransform>
1059                    <TransformGroup>
1060                        <ScaleTransform/>
1061                        <SkewTransform/>
1062                        <RotateTransform Angle="45"/>
1063                        <TranslateTransform/>
1064                    </TransformGroup>
1065                </Grid.RenderTransform>
1066                <Path x:Name="path1" Height="16" Width="16" RenderTransformOrigin="0.5,0.5" Fill="{x:Null}" Stretch="Fill" Stroke="#FF8C8C8C" StrokeThickness="1" Data="M7.5,1.5 L10.5,1.5 L10.5,7.5 L16.5,7.5 L16.5,10.5 L10.5,10.5 L10.5,16.5 L7.5,16.5 L7.5,10.5 L1.5,10.5 L1.5,7.5 L7.5,7.5 z" Margin="1,-1,1,3">
1067                    <Path.RenderTransform>
1068                        <TransformGroup>
1069                            <ScaleTransform/>
1070                            <SkewTransform/>
1071                            <RotateTransform Angle="-90"/>
1072                            <TranslateTransform Y="2" X="0"/>
1073                        </TransformGroup>
1074                    </Path.RenderTransform>
1075                </Path>
1076                <Path x:Name="path" Height="16" Width="16" RenderTransformOrigin="0.5,0.5" Fill="#FFD60808" Stretch="Fill" Data="M7.5,1.5 L10.5,1.5 L10.5,7.5 L16.5,7.5 L16.5,10.5 L10.5,10.5 L10.5,16.5 L7.5,16.5 L7.5,10.5 L1.5,10.5 L1.5,7.5 L7.5,7.5 z" StrokeThickness="0" Margin="1,-1,1,3">
1077                    <Path.RenderTransform>
1078                        <TransformGroup>
1079                            <ScaleTransform/>
1080                            <SkewTransform/>
1081                            <RotateTransform Angle="-90"/>
1082                            <TranslateTransform Y="2" X="0"/>
1083                        </TransformGroup>
1084                    </Path.RenderTransform>
1085                </Path>
1086            </Grid>
1087        </Border>
1088        <ControlTemplate.Triggers>
1089            <Trigger Property="IsMouseOver" Value="True">
1090                <Setter TargetName="path1" Property="Visibility" Value="Collapsed" />
1091                <Setter TargetName="path" Property="Visibility" Value="Visible" />
1092            </Trigger>
1093            <Trigger Property="IsMouseOver" Value="False">
1094                <Setter TargetName="path1" Property="Visibility" Value="Visible" />
1095                <Setter TargetName="path" Property="Visibility" Value="Collapsed" />
1096            </Trigger>
1097        </ControlTemplate.Triggers>
1098    </ControlTemplate>
1099
1100    <ControlTemplate x:Key="RemoveButtonTemplate" TargetType="Button">
1101        <Border Width="18" Height="18" Background="#00000000" Margin="2,0,2,0">
1102            <Grid>
1103                <Path x:Name="path1" Height="4" Width="16" RenderTransformOrigin="0.5,0.5" Fill="{x:Null}" Stretch="Fill" Stroke="#FF8C8C8C" StrokeThickness="1" Data="M7.5,1.5 L10.5,1.5 L10.5,16.5 L7.5,16.5 z" HorizontalAlignment="Center" VerticalAlignment="Center"/>
1104                <Path x:Name="path" RenderTransformOrigin="0.5,0.5" Fill="#FFD60808" Stretch="Fill" Data="M7.5,1.5 L10.5,1.5 L10.5,16.5 L7.5,16.5 z" Height="4" Width="16"/>
1105            </Grid>
1106        </Border>
1107        <ControlTemplate.Triggers>
1108            <Trigger Property="IsMouseOver" Value="True">
1109                <Setter TargetName="path1" Property="Visibility" Value="Collapsed" />
1110                <Setter TargetName="path" Property="Visibility" Value="Visible" />
1111            </Trigger>
1112            <Trigger Property="IsMouseOver" Value="False">
1113                <Setter TargetName="path1" Property="Visibility" Value="Visible" />
1114                <Setter TargetName="path" Property="Visibility" Value="Collapsed" />
1115            </Trigger>
1116        </ControlTemplate.Triggers>
1117    </ControlTemplate>
1118
1119    <!-- Submit/Cancel buttons -->
1120
1121    <LinearGradientBrush x:Key="SubmitButtonEnabledBG" EndPoint="0.5,1" StartPoint="0.5,0">
1122        <GradientStop Color="#FF006C3B" Offset="0.163"/>
1123        <GradientStop Color="#FF00A04D" Offset="1"/>
1124    </LinearGradientBrush>
1125    <LinearGradientBrush x:Key="SubmitButtonDisabledBG" EndPoint="0.5,1" StartPoint="0.5,0">
1126        <GradientStop Color="#FF6C6C6C" Offset="0.163"/>
1127        <GradientStop Color="#FF9F9F9F" Offset="1"/>
1128    </LinearGradientBrush>
1129
1130    <ControlTemplate x:Key="SubmitButtonTemplate" TargetType="Button">
1131        <Grid Height="{TemplateBinding Height}">
1132            <Border Width="105" x:Name="BgEnabled" Background="#FF006C3B" BorderBrush="#FFFFFFFF" BorderThickness="2,2,1,2" CornerRadius="9,0,0,9" HorizontalAlignment="Right">
1133                <TextBlock x:Name="textBlock" Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FFFFFFFF" />
1134            </Border>
1135        </Grid>
1136        <ControlTemplate.Triggers>
1137
1138            <Trigger Property="IsEnabled" Value="false">
1139                <Trigger.EnterActions>
1140                    <BeginStoryboard>
1141                        <Storyboard>
1142                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.3" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(UIElement.Opacity)"  AutoReverse="true">
1143                                <SplineDoubleKeyFrame KeyTime="00:00:00.3" Value="0" KeySpline="0.5,0,0.5,1" />
1144                            </DoubleAnimationUsingKeyFrames>
1145                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.3" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(FrameworkElement.Width)"  AutoReverse="true">
1146                                <SplineDoubleKeyFrame KeyTime="00:00:00.3" Value="0" KeySpline="0.5,0,0.5,1" />
1147                            </DoubleAnimationUsingKeyFrames>
1148                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.3" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(UIElement.Opacity)"  AutoReverse="true">
1149                                <SplineDoubleKeyFrame KeyTime="00:00:00.3" Value="0" KeySpline="0.5,0,0.5,1" />
1150                            </DoubleAnimationUsingKeyFrames>
1151                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.2" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
1152                                <SplineColorKeyFrame KeyTime="00:00:00.1" Value="#FF006C3B"/>
1153                                <SplineColorKeyFrame KeyTime="00:00:00.2" Value="#FF6C6C6C"/>
1154                            </ColorAnimationUsingKeyFrames>
1155                        </Storyboard>
1156                    </BeginStoryboard>
1157                </Trigger.EnterActions>
1158                <Trigger.ExitActions>
1159                    <BeginStoryboard>
1160                        <Storyboard>
1161                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.3" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(UIElement.Opacity)"  AutoReverse="true">
1162                                <SplineDoubleKeyFrame KeyTime="00:00:00.3" Value="0" KeySpline="0.5,0,0.5,1" />
1163                            </DoubleAnimationUsingKeyFrames>
1164                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.3" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(FrameworkElement.Width)"  AutoReverse="true">
1165                                <SplineDoubleKeyFrame KeyTime="00:00:00.3" Value="0" KeySpline="0.5,0,0.5,1" />
1166                            </DoubleAnimationUsingKeyFrames>
1167                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.3" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(UIElement.Opacity)"  AutoReverse="true">
1168                                <SplineDoubleKeyFrame KeyTime="00:00:00.3" Value="0" KeySpline="0.5,0,0.5,1" />
1169                            </DoubleAnimationUsingKeyFrames>
1170                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.2" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
1171                                <SplineColorKeyFrame KeyTime="00:00:00.1" Value="#FF6C6C6C"/>
1172                                <SplineColorKeyFrame KeyTime="00:00:00.2" Value="#FF006C3B"/>
1173                            </ColorAnimationUsingKeyFrames>
1174                        </Storyboard>
1175                    </BeginStoryboard>
1176                </Trigger.ExitActions>
1177            </Trigger>
1178
1179        </ControlTemplate.Triggers>
1180    </ControlTemplate>
1181
1182    <ControlTemplate x:Key="CancelButtonTemplate" TargetType="Button">
1183        <Grid Height="{TemplateBinding Height}">
1184            <Border Width="105" BorderBrush="#FFFFFFFF" BorderThickness="1,2,2,2" CornerRadius="0,9,9,0" Background="#FFFFFFFF">
1185                <TextBlock Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF666666"  Margin="-9,0,0,0" />
1186            </Border>
1187        </Grid>
1188    </ControlTemplate>
1189
1190    <!-- ScrollBar -->
1191
1192    <Style x:Key="ScrollBarLineButton" TargetType="{x:Type RepeatButton}">
1193        <Setter Property="SnapsToDevicePixels" Value="True"/>
1194        <Setter Property="OverridesDefaultStyle" Value="true"/>
1195        <Setter Property="Focusable" Value="false"/>
1196        <Setter Property="Template">
1197            <Setter.Value>
1198                <ControlTemplate TargetType="{x:Type RepeatButton}">
1199                    <Border 
1200          x:Name="Border"
1201          Margin="1" 
1202          CornerRadius="2" 
1203          Background="{x:Null}"
1204          BorderBrush="{x:Null}"
1205          BorderThickness="1">
1206                        <Path 
1207            HorizontalAlignment="Center"
1208            VerticalAlignment="Center"
1209            Fill="#404040"
1210            Data="{Binding Path=Content, RelativeSource={RelativeSource TemplatedParent}}" />
1211                    </Border>
1212                    <ControlTemplate.Triggers>
1213                        <Trigger Property="IsPressed" Value="true">
1214                            <Setter TargetName="Border" Property="Background" Value="#E0E0E0" />
1215                        </Trigger>
1216                        <Trigger Property="IsEnabled" Value="false">
1217                            <Setter Property="Foreground" Value="#888888"/>
1218                        </Trigger>
1219                    </ControlTemplate.Triggers>
1220                </ControlTemplate>
1221            </Setter.Value>
1222        </Setter>
1223    </Style>
1224
1225    <Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
1226        <Setter Property="SnapsToDevicePixels" Value="True"/>
1227        <Setter Property="OverridesDefaultStyle" Value="true"/>
1228        <Setter Property="IsTabStop" Value="false"/>
1229        <Setter Property="Focusable" Value="false"/>
1230        <Setter Property="Template">
1231            <Setter.Value>
1232                <ControlTemplate TargetType="{x:Type RepeatButton}">
1233                    <Border Background="Transparent" />
1234                </ControlTemplate>
1235            </Setter.Value>
1236        </Setter>
1237    </Style>
1238
1239    <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
1240