Skip to content

Instantly share code, notes, and snippets.

View s-fernandez-v's full-sized avatar

Sergio Fernandez s-fernandez-v

View GitHub Profile
@s-fernandez-v
s-fernandez-v / Main.xaml
Created December 22, 2023 18:28
Christmas'23
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="1920" d:DesignHeight="1080">
<Grid.Background>
<RadialGradientBrush RadiusY="0.6883516" RadiusX="0.439797">
<RadialGradientBrush.RelativeTransform>
<TransformGroup>
@s-fernandez-v
s-fernandez-v / Landscape.jpg
Last active September 20, 2023 15:36
Blur Edges
Landscape.jpg
@s-fernandez-v
s-fernandez-v / Main.xaml
Created July 25, 2023 09:19
In Out Animation
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.Resources>
<ControlTemplate x:Key="imgBtn" TargetType="ToggleButton">
<Ellipse x:Name="img" Fill="Silver" RenderTransformOrigin="1,0.75">
<Ellipse.RenderTransform>
<ScaleTransform/>
</Ellipse.RenderTransform>
</Ellipse>
@s-fernandez-v
s-fernandez-v / Main.xaml
Last active July 3, 2023 10:02
List animation
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions">
<Grid.Resources>
<ControlTemplate x:Key="btnTemplate" TargetType="Button">
<Border x:Name="Root" Background="{TemplateBinding Background}" Height="100">
<StackPanel VerticalAlignment="Center">
<TextBlock x:Name="Header" Text="{TemplateBinding Content}" FontSize="20"
FontWeight="Bold" Foreground="White" noesis:Text.Stroke="#80000000" noesis:Text.StrokeThickness="2.5"
@s-fernandez-v
s-fernandez-v / Main.xaml
Created April 11, 2023 09:33
Focus navigation
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid x:Name="MenuOptions" Grid.Row="1" Width="640" Margin="0,30,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Height="300">
<StackPanel KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabNavigation="Contained">
<Rectangle Height="2" Margin="0,0,0,2" Fill="Silver"/>
<ToggleButton x:Name="Casual" Content="CASUAL" Command="{Binding StartCasual}"/>
<ToggleButton x:Name="Normal" Content="NORMAL" Command="{Binding StartNormal}"/>
<ToggleButton x:Name="Expert" Content="EXPERT" Command="{Binding StartExpert}"/>
@s-fernandez-v
s-fernandez-v / Main.xaml
Last active March 27, 2023 11:31
BorderBrush action
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors">
<Border x:Name="TheBorder" Width="200" Height="100" BorderBrush="Red" Background="Pink">
<b:Interaction.Triggers>
<b:EventTrigger EventName="Loaded">
<b:ChangePropertyAction TargetName="TheBorder" PropertyName="BorderThickness" Value="1"/>
</b:EventTrigger>
<b:EventTrigger EventName="MouseDown">
@s-fernandez-v
s-fernandez-v / Main.xaml
Last active November 3, 2022 12:13 — forked from jesusdesantos/Main.xaml
Right-to-left Image
<StackPanel xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Orientation="Horizontal" VerticalAlignment="Center" FlowDirection="RightToLeft">
<Border BorderBrush="OrangeRed" BorderThickness="2" Margin="5">
<Image Source="Road.jpg" Height="300"/>
</Border>
<Border BorderBrush="Gold" BorderThickness="2" Margin="5">
<Image Source="Road.jpg" Height="300" FlowDirection="RightToLeft"/>
</Border>
</StackPanel>
@s-fernandez-v
s-fernandez-v / Landscape.jpg
Last active October 17, 2022 10:01
Background Blur
Landscape.jpg
@s-fernandez-v
s-fernandez-v / Main.xaml
Created September 27, 2022 10:21
Fade tabs
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.Resources>
<Storyboard x:Key="ShowAnim" AccelerationRatio="0.5" DecelerationRatio="0.5">
<DoubleAnimation Storyboard.TargetName="Tabs" Storyboard.TargetProperty="RenderTransform.X" To="0" Duration="0:0:0.2"/>
</Storyboard>
<Storyboard x:Key="HideAnim" AccelerationRatio="0.5" DecelerationRatio="0.5">
<DoubleAnimation Storyboard.TargetName="Tabs" Storyboard.TargetProperty="RenderTransform.X" To="-340" Duration="0:0:0.2"/>
</Storyboard>
@s-fernandez-v
s-fernandez-v / Main.xaml
Created July 18, 2022 15:13
Custom border stretch
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions">
<Border Margin="100,200">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60"/>
<ColumnDefinition/>
<ColumnDefinition Width="80"/>