-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23142c1
commit a98b289
Showing
28 changed files
with
498 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows.Controls; | ||
|
||
namespace Project1.UI.Controls | ||
{ | ||
public class ContentCard : ContentControl | ||
{ | ||
public ContentCard() | ||
{ | ||
DefaultStyleKey = typeof(ContentCard); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:controls="clr-namespace:Project1.UI.Controls" | ||
xmlns:converter="clr-namespace:Project1.UI.Controls.Converters" | ||
> | ||
<Style TargetType="{x:Type controls:ContentCard}"> | ||
<Setter Property="Background" Value="Transparent" /> | ||
<Setter Property="SnapsToDevicePixels" Value="False" /> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="{x:Type controls:ContentCard}"> | ||
|
||
<Border | ||
BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}" | ||
Background="{TemplateBinding Background}"> | ||
<ContentPresenter HorizontalAlignment="Center" | ||
VerticalAlignment="Center" | ||
RecognizesAccessKey="True" | ||
SnapsToDevicePixels="False" | ||
/> | ||
</Border> | ||
|
||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
|
||
</Style> | ||
|
||
|
||
</ResourceDictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
src/Local/ProjectEye/Resources/Themes/Blue/ContentCard.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:controls="clr-namespace:Project1.UI.Controls;assembly=Project1.UI" | ||
> | ||
|
||
<Style TargetType="{x:Type controls:ContentCard}"> | ||
<Setter Property="Background" Value="Transparent" /> | ||
<Setter Property="SnapsToDevicePixels" Value="False" /> | ||
<Setter Property="Padding" Value="0" /> | ||
<Setter Property="Margin" Value="0" /> | ||
<Setter Property="VerticalContentAlignment" Value="Stretch" /> | ||
<Setter Property="HorizontalContentAlignment" Value="Stretch" /> | ||
<Setter Property="VerticalAlignment" Value="Stretch" /> | ||
<Setter Property="HorizontalAlignment" Value="Stretch" /> | ||
|
||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="{x:Type controls:ContentCard}"> | ||
<Grid> | ||
<Border | ||
BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}" | ||
Background="{TemplateBinding Background}" | ||
Margin="15" | ||
Padding="{TemplateBinding Padding}" | ||
CornerRadius="6" | ||
RenderTransformOrigin=".5,.5" | ||
> | ||
<Border.RenderTransform> | ||
<ScaleTransform x:Name="Scale" ScaleX="0.99" ScaleY="0.99"/> | ||
</Border.RenderTransform> | ||
<Border.Effect> | ||
<DropShadowEffect x:Name="Shadow" BlurRadius="30" Direction="0" ShadowDepth="0" Opacity="0" RenderingBias="Performance" ></DropShadowEffect> | ||
</Border.Effect> | ||
<ContentPresenter | ||
RecognizesAccessKey="True" Margin="0" | ||
SnapsToDevicePixels="True" | ||
/> | ||
</Border> | ||
|
||
|
||
</Grid> | ||
|
||
<ControlTemplate.Triggers> | ||
<MultiTrigger> | ||
<MultiTrigger.Conditions> | ||
<Condition Property="IsMouseOver" Value="True" /> | ||
</MultiTrigger.Conditions> | ||
<MultiTrigger.EnterActions> | ||
<BeginStoryboard> | ||
<Storyboard> | ||
<DoubleAnimation Duration="0:0:0.15" | ||
Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Shadow" To=".1" /> | ||
<DoubleAnimation Duration="0:0:0.15" | ||
Storyboard.TargetProperty="ScaleX" Storyboard.TargetName="Scale" To="1" /> | ||
<DoubleAnimation Duration="0:0:0.15" | ||
Storyboard.TargetProperty="ScaleY" Storyboard.TargetName="Scale" To="1" /> | ||
</Storyboard> | ||
</BeginStoryboard> | ||
</MultiTrigger.EnterActions> | ||
<MultiTrigger.ExitActions> | ||
<BeginStoryboard> | ||
<Storyboard> | ||
<DoubleAnimation Duration="0:0:0.15" | ||
Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Shadow" To="0" /> | ||
<DoubleAnimation Duration="0:0:0.15" | ||
Storyboard.TargetProperty="ScaleX" Storyboard.TargetName="Scale" To=".99" /> | ||
<DoubleAnimation Duration="0:0:0.15" | ||
Storyboard.TargetProperty="ScaleY" Storyboard.TargetName="Scale" To=".99" /> | ||
</Storyboard> | ||
</BeginStoryboard> | ||
</MultiTrigger.ExitActions> | ||
</MultiTrigger> | ||
</ControlTemplate.Triggers> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
|
||
</Style> | ||
|
||
</ResourceDictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.