Skip to content

Instantly share code, notes, and snippets.

@dpogue
Created January 30, 2011 22:18
Show Gist options
  • Save dpogue/803332 to your computer and use it in GitHub Desktop.
Save dpogue/803332 to your computer and use it in GitHub Desktop.
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ctrl="clr-namespace:CCClient">
<RadialGradientBrush x:Key="GlowBrush">
<RadialGradientBrush.RelativeTransform>
<TransformGroup>
<ScaleTransform ScaleX="1.702" ScaleY="2.243"/>
<SkewTransform AngleX="0" AngleY="0"/>
<RotateTransform Angle="0"/>
<TranslateTransform X="-0.368" Y="-0.152"/>
</TransformGroup>
</RadialGradientBrush.RelativeTransform>
<GradientStop Color="#B28DBDFF" Offset="0"/>
<GradientStop Color="#008DBDFF" Offset="1"/>
</RadialGradientBrush>
<Style TargetType="{x:Type ctrl:AppButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ctrl:AppButton}">
<ControlTemplate.Resources>
<Storyboard x:Key="Timeline1">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="glow" Storyboard.TargetProperty="(UIElement.Opacity)">
<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="Timeline2">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="glow" Storyboard.TargetProperty="(UIElement.Opacity)">
<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<Border SnapsToDevicePixels="True" x:Name="border1" BorderBrush="#00FFFFFF" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4">
<Border SnapsToDevicePixels="True" x:Name="border2" Background="#00000000" BorderBrush="#00000000" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.507*"/>
<RowDefinition Height="0.493*"/>
</Grid.RowDefinitions>
<Border Opacity="0" HorizontalAlignment="Stretch" x:Name="glow" Width="Auto" Grid.RowSpan="2" CornerRadius="4,4,4,4" Background="{StaticResource GlowBrush}" />
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto" Grid.RowSpan="2"/>
</Grid>
</Border>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="BorderBrush" TargetName="border1" Value="#FFFFFFFF"/>
<Setter Property="BorderBrush" TargetName="border2" Value="#FF000000"/>
<Setter Property="Background" TargetName="border2" Value="{StaticResource GlowBrush}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource Timeline1}"/>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource Timeline2}"/>
</Trigger.ExitActions>
<Setter Property="BorderBrush" TargetName="border1" Value="#FFFFFFFF"/>
<Setter Property="BorderBrush" TargetName="border2" Value="#FF000000"/>
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter Property="BorderBrush" TargetName="border1" Value="#FFFFFFFF"/>
<Setter Property="BorderBrush" TargetName="border2" Value="#FF000000"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True"/>
<Condition Property="IsChecked" Value="True"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" TargetName="border1" Value="#FFFFFFFF"/>
<Setter Property="BorderBrush" TargetName="border2" Value="#FF000000"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsKeyboardFocused" Value="True"/>
<Condition Property="IsChecked" Value="True"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" TargetName="border1" Value="#FFFFFFFF"/>
<Setter Property="BorderBrush" TargetName="border2" Value="#FF000000"/>
</MultiTrigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="BorderBrush" TargetName="border1" Value="#FFFFFFFF"/>
<Setter Property="BorderBrush" TargetName="border2" Value="#FF000000"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ctrl="clr-namespace:CCClient"
x:Class="CCClient.ClientWin"
SourceInitialized="Window_SourceInitialized"
MouseMove="Window_MouseMove"
Loaded="Window_Loaded"
KeyUp="Window_KeyUp"
Title="Windows CyanChat" Height="600" Width="800"
WindowStyle="SingleBorderWindow" Visibility="Collapsed">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/CCClient;component/AppButton.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid ShowGridLines="False" Width="Auto">
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="30" />
<RowDefinition />
</Grid.RowDefinitions>
<ctrl:AppButton Margin="5,5,5,5" x:Name="btnApp" Grid.RowSpan="2" Grid.ColumnSpan="1" Width="55" HorizontalAlignment="Left">
<Viewbox Stretch="Uniform">
<Canvas Width="48.81" Height="48.81">
<Canvas Canvas.Left="0" Canvas.Top="0">
<Canvas>
<Canvas RenderTransform="1.0506329536438,0,0,1.0506329536438,0,0" Canvas.Left="-6.78" Canvas.Top="-10.07">
<Path Fill="#FF2D2000" Data="M52.00,32.43C52.00,44.89,41.89,55.00,29.43,55.00C16.96,55.00,6.86,44.89,6.86,32.43C6.86,19.96,16.96,9.86,29.43,9.86C41.89,9.86,52.00,19.96,52.00,32.43z"/>
</Canvas>
<Canvas RenderTransform="0.999407708644867,0,0,0.984495401382446,0,0" Canvas.Left="-5.27" Canvas.Top="-8.00">
<Path Fill="#FFBC8C00" Data="M52.00,32.43C52.00,44.89,41.89,55.00,29.43,55.00C16.96,55.00,6.86,44.89,6.86,32.43C6.86,19.96,16.96,9.86,29.43,9.86C41.89,9.86,52.00,19.96,52.00,32.43z"/>
</Canvas>
<Canvas RenderTransform="0.933429002761841,0,0,0.921681225299835,0,0" Canvas.Left="-3.33" Canvas.Top="-6.03">
<Path Data="M52.00,32.43C52.00,44.89,41.89,55.00,29.43,55.00C16.96,55.00,6.86,44.89,6.86,32.43C6.86,19.96,16.96,9.86,29.43,9.86C41.89,9.86,52.00,19.96,52.00,32.43z">
<Path.Fill>
<RadialGradientBrush Center="29.428572,32.42857" RadiusX="22.57" RadiusY="22.57" GradientOrigin="29.428572,32.42857" MappingMode="Absolute">
<GradientStop Color="#FF9A5C00" Offset="0"/>
<GradientStop Color="#FF5A4600" Offset="1"/>
</RadialGradientBrush>
</Path.Fill>
</Path>
</Canvas>
<Canvas Canvas.Left="-0.85" Canvas.Top="-1.38">
<Path Data="M41.99,24.94C41.99,27.84,39.64,30.18,36.75,30.18C33.86,30.18,31.51,27.84,31.51,24.94C31.51,22.05,33.86,19.70,36.75,19.70C39.64,19.70,41.99,22.05,41.99,24.94z">
<Path.Fill>
<RadialGradientBrush Center="36.750591,24.940805" RadiusX="5.24" RadiusY="5.24" GradientOrigin="36.750591,24.940805" MappingMode="Absolute">
<GradientStop Color="#FF386DC8" Offset="0"/>
<GradientStop Color="#FF0063C8" Offset="0.89"/>
<GradientStop Color="#000071C8" Offset="1"/>
</RadialGradientBrush>
</Path.Fill>
</Path>
</Canvas>
<Canvas RenderTransform="0.763880610466003,0,0,0.747014999389648,0,0" Canvas.Left="7.83" Canvas.Top="4.93">
<Path Data="M41.99,24.94C41.99,27.84,39.64,30.18,36.75,30.18C33.86,30.18,31.51,27.84,31.51,24.94C31.51,22.05,33.86,19.70,36.75,19.70C39.64,19.70,41.99,22.05,41.99,24.94z">
<Path.Fill>
<RadialGradientBrush Center="36.750591,24.940805" RadiusX="5.24" RadiusY="5.24" GradientOrigin="36.750591,24.940805" MappingMode="Absolute">
<GradientStop Color="#FF388FC8" Offset="0"/>
<GradientStop Color="#FF00A0C8" Offset="1"/>
</RadialGradientBrush>
</Path.Fill>
</Path>
</Canvas>
</Canvas>
<Canvas>
<Path Data="M23.15,6.84C14.38,6.84,8.06,14.76,8.06,23.69C8.06,32.62,15.17,39.88,23.94,39.88C28.61,39.88,32.81,37.78,35.72,34.50C35.58,34.66,35.45,34.78,35.44,34.78C35.42,34.78,34.32,33.69,32.97,32.34C31.20,30.57,30.52,29.88,30.56,29.81C30.58,29.78,30.35,30.11,30.42,30.02C28.76,32.04,26.57,32.88,23.75,32.88C18.74,32.88,14.69,28.79,14.69,23.78C14.69,18.77,18.74,14.72,23.75,14.72C26.55,14.72,28.73,15.61,30.39,17.61L30.44,17.63L31.00,17.09C31.30,16.80,32.44,15.68,33.53,14.63C35.86,12.41,34.39,13.82,35.68,12.55C33.04,10.31,29.24,6.84,23.15,6.84z">
<Path.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="0.0371556391327,1" MappingMode="RelativeToBoundingBox" SpreadMethod="Pad">
<GradientStop Color="#FFD3BC5F" Offset="0"/>
<GradientStop Color="#C187783C" Offset="1"/>
</LinearGradientBrush>
</Path.Fill>
</Path>
</Canvas>
</Canvas>
</Canvas>
</Viewbox>
<ctrl:AppButton.DropDown>
<ContextMenu>
<MenuItem x:Name="mnuConnect" Header="Connect" Click="mnuConnect_Click"/>
<MenuItem x:Name="mnuDisconnect" Header="Disconnect" IsEnabled="False" Click="mnuDisconnect_Click"/>
<Separator />
<MenuItem x:Name="mnuOptions" Header="Preferences" Click="mnuOptions_Click" />
<Separator />
<MenuItem x:Name="optFlash" Header="Flash on Message" IsCheckable="True" Checked="optFlash_Checked"/>
</ContextMenu>
</ctrl:AppButton.DropDown>
</ctrl:AppButton>
<Grid Grid.Row="0" ShowGridLines="False">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60" />
<ColumnDefinition Width="200" />
<ColumnDefinition Width="75" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBox Grid.Column="1" Margin="5,3,5,5" Name="txtNickname" KeyDown="txtNickname_KeyDown"/>
<Button Grid.Column="2" Margin="5,3,5,5" Name="btnLogin" Padding="0" Click="btnLogin_Click">Login</Button>
</Grid>
<Grid Grid.Row="1" ShowGridLines="False">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60" />
<ColumnDefinition MinWidth="200" />
<ColumnDefinition Width="75" />
<ColumnDefinition Width="75" />
<ColumnDefinition Width="75" />
</Grid.ColumnDefinitions>
<TextBox Grid.Column="1" Margin="5,3,5,5" Name="txtChat" KeyDown="txtChat_KeyDown" />
<Button Grid.Column="2" Margin="5,3,5,5" Name="btnSend" Padding="0" Click="btnSend_Click">Send</Button>
<Button Grid.Column="3" Margin="5,3,5,5" Name="btnPrivate" Padding="0" Click="btnPrivate_Click">Send PM</Button>
<Button Grid.Column="4" Margin="5,3,5,5" Name="btnIgnore" Padding="0" Click="btnIgnore_Click">Ignore</Button>
</Grid>
<TabControl Grid.Row="2" Name="tabControl1" TabStripPlacement="Bottom" Padding="0" SelectionChanged="tabSelectionChanged" MouseUp="tabControl1_MouseUp">
<TabItem Header="Cyanchat" Padding="0" MinHeight="20" MaxHeight="20">
<Grid Background="Black">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="578*" />
<ColumnDefinition Width="200*" />
</Grid.ColumnDefinitions>
<ListBox Grid.Column="1" Name="lstUsers" Background="Black">
</ListBox>
<RichTextBox IsDocumentEnabled="True" Name="rtbChatArea" FontSize="13" Background="Black" Foreground="{StaticResource Chat}" Padding="2,1,1,1" VerticalScrollBarVisibility="Auto" />
<GridSplitter Name="splArea" Width="3" Grid.ColumnSpan="1" />
</Grid>
</TabItem>
</TabControl>
</Grid>
</Window>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment