Skip to content

Commit

Permalink
chore: add grid and canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelMendesRosa authored and rafael-rosa-knowcode committed Aug 22, 2023
1 parent eb04b2a commit 9f30290
Show file tree
Hide file tree
Showing 6 changed files with 221 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
OffsetY="10"
Opacity="0.5"
Spread="0"
Color="{StaticResource UnoColor}" />
Color="{StaticResource UnoPink}" />

<utu:ShadowCollection x:Name="ButtonShadows">
<utu:Shadow BlurRadius="20"
OffsetX="8"
OffsetY="8"
Opacity="0.5"
Color="{StaticResource UnoColor}" />
Color="{StaticResource UnoPink}" />
</utu:ShadowCollection>

<utu:ShadowCollection x:Key="NeumorphismRaising">
Expand Down Expand Up @@ -89,7 +89,7 @@
<sample:SamplePageLayout.DesignAgnosticTemplate>
<DataTemplate>
<ScrollViewer HorizontalScrollMode="Disabled">
<StackPanel>
<StackPanel Spacing="20">

<TextBlock Margin="0,24,0,0"
Style="{StaticResource TitleTextBlockStyle}"
Expand Down Expand Up @@ -209,7 +209,7 @@
Text="Being able to add several shadows enables you to create neumorphic designs." />


<StackPanel Width="400"
<StackPanel HorizontalAlignment="Stretch"
Margin="0,32"
Padding="32"
Background="{StaticResource UnoColor}"
Expand Down Expand Up @@ -284,7 +284,7 @@
</utu:ShadowContainer>

<utu:ShadowContainer Shadows="{StaticResource NeumorphismRaising}">
<Button Width="80"
<Button Width="100"
Height="80"
Background="{StaticResource UnoColor}"
BorderBrush="{StaticResource UnoColor}"
Expand All @@ -304,23 +304,14 @@
</StackPanel>
</StackPanel>

<!-- Test ShadowContainer not stretching its content by default -->
<!--Test ShadowContainer not stretching its content by default-->

<StackPanel Background="{StaticResource UnoColor}"
HorizontalAlignment="Stretch"
BorderBrush="Black"
BorderThickness="1"
Spacing="50"
Padding="20">
<Button Content="Test Test TestTest Test Test" HorizontalAlignment="Stretch" Background="Aquamarine"></Button>
<TextBox Padding="10"
Background="Purple"
CornerRadius="20"
Foreground="White"
HorizontalAlignment="Stretch"
PlaceholderForeground="LightGray"
PlaceholderText="Hollow element"
Text="Password" />

<utu:ShadowContainer Shadows="{StaticResource ButtonShadows}"
HorizontalAlignment="Stretch"
Expand All @@ -332,7 +323,7 @@
Foreground="White"
HorizontalAlignment="Stretch"
PlaceholderForeground="LightGray"
PlaceholderText="Hollow element"
PlaceholderText="Shadows element"
Text="NO Padding NO Margin"/>
</utu:ShadowContainer>

Expand All @@ -346,7 +337,7 @@
Foreground="White"
HorizontalAlignment="Stretch"
PlaceholderForeground="LightGray"
PlaceholderText="Hollow element"
PlaceholderText="Shadows element"
Text="Padding"/>
</utu:ShadowContainer>

Expand All @@ -360,7 +351,7 @@
Foreground="White"
HorizontalAlignment="Stretch"
PlaceholderForeground="LightGray"
PlaceholderText="Hollow element"
PlaceholderText="Shadows element"
Text="Margin"
Margin="30,30,30,30"/>
</utu:ShadowContainer>
Expand All @@ -376,7 +367,7 @@
Foreground="White"
HorizontalAlignment="Stretch"
PlaceholderForeground="LightGray"
PlaceholderText="Hollow element"
PlaceholderText="Shadows element"
Text="Padding + Margin diff"
Margin="15,30,50,30"/>
</utu:ShadowContainer>
Expand All @@ -392,28 +383,19 @@
Foreground="White"
HorizontalAlignment="Stretch"
PlaceholderForeground="LightGray"
PlaceholderText="Hollow element"
PlaceholderText="Shadows element"
Text="Padding"
Padding="15,30,50,30"/>
</utu:ShadowContainer>
</StackPanel>


<StackPanel Background="{StaticResource UnoColor}"
HorizontalAlignment="Stretch"
BorderBrush="Black"
BorderThickness="1"
Spacing="50"
Padding="20">
<Button Content="Test Test TestTest Test Test" HorizontalAlignment="Stretch" Background="Aquamarine"></Button>
<TextBox Padding="10"
Background="Purple"
CornerRadius="20"
Foreground="White"
HorizontalAlignment="Stretch"
PlaceholderForeground="LightGray"
PlaceholderText="Hollow element"
Text="Password" />

<utu:ShadowContainer Shadows="{StaticResource NeumorphismHollow}"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch">
Expand Down Expand Up @@ -496,15 +478,6 @@
BorderThickness="1"
Spacing="50"
Padding="20">
<Button Content="Test Test TestTest Test Test" HorizontalAlignment="Stretch" Background="Aquamarine"></Button>
<TextBox Padding="10"
Background="Purple"
CornerRadius="20"
Foreground="White"
HorizontalAlignment="Stretch"
PlaceholderForeground="LightGray"
PlaceholderText="Hollow element"
Text="Password" />

<utu:ShadowContainer Shadows="{StaticResource NeumorphismRaising}"
HorizontalAlignment="Stretch"
Expand All @@ -514,10 +487,10 @@
BorderThickness="0"
CornerRadius="20"
Foreground="White"
HorizontalAlignment="Stretch"
HorizontalAlignment="Center"
PlaceholderForeground="LightGray"
PlaceholderText="Hollow element"
Text="NO Padding NO Margin"/>
PlaceholderText="Raising element"
Text="Center"/>
</utu:ShadowContainer>

<utu:ShadowContainer Shadows="{StaticResource NeumorphismRaising}"
Expand All @@ -528,25 +501,25 @@
BorderThickness="0"
CornerRadius="20"
Foreground="White"
HorizontalAlignment="Stretch"
HorizontalAlignment="Right"
PlaceholderForeground="LightGray"
PlaceholderText="Hollow element"
Text="Padding"/>
PlaceholderText="Raising element"
Text="Right"/>
</utu:ShadowContainer>


<utu:ShadowContainer Shadows="{StaticResource NeumorphismRaising}"
<utu:ShadowContainer Shadows="{StaticResource NeumorphismHollow}"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch">
<TextBox Background="{StaticResource UnoColor}"
BorderThickness="0"
CornerRadius="20"
Foreground="White"
HorizontalAlignment="Stretch"
HorizontalAlignment="Right"
PlaceholderForeground="LightGray"
PlaceholderText="Hollow element"
Text="Margin"
Margin="30,30,30,30"/>
Text="Right"
Margin="200,30,30,30"/>
</utu:ShadowContainer>


Expand All @@ -558,27 +531,145 @@
BorderThickness="0"
CornerRadius="20"
Foreground="White"
HorizontalAlignment="Stretch"
HorizontalAlignment="Left"
PlaceholderForeground="LightGray"
PlaceholderText="Raising element"
Text="Left"
Margin="15,30,200,30"/>
</utu:ShadowContainer>


<utu:ShadowContainer Shadows="{StaticResource NeumorphismHollow}"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch">
<TextBox
Background="{StaticResource UnoColor}"
BorderThickness="0"
CornerRadius="20"
Foreground="White"
HorizontalAlignment="Left"
PlaceholderForeground="LightGray"
PlaceholderText="Hollow element"
Text="Padding + Margin diff"
Margin="15,30,50,30"/>
Text="Left"
Padding="15,30,50,30"/>
</utu:ShadowContainer>
<utu:ShadowContainer Shadows="{StaticResource NeumorphismHollow}"
HorizontalAlignment="Center"
HorizontalContentAlignment="Center">
<TextBox
Background="{StaticResource UnoColor}"
BorderThickness="0"
CornerRadius="20"
Foreground="White"
HorizontalAlignment="Left"
PlaceholderForeground="LightGray"
PlaceholderText="Hollow element"
Text="Left on ShadowContainer Center"
Padding="15,30,50,30"/>
</utu:ShadowContainer>
</StackPanel>


<StackPanel Background="{StaticResource UnoColor}"
HorizontalAlignment="Stretch"
BorderBrush="Black"
BorderThickness="1"
Spacing="50"
Padding="20">

<utu:ShadowContainer Shadows="{StaticResource NeumorphismRaising}"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch">
<TextBox Padding="10"
Background="{StaticResource UnoColor}"
BorderThickness="0"
CornerRadius="20"
Foreground="White"
HorizontalAlignment="Center"
VerticalAlignment="Center"
PlaceholderForeground="LightGray"
PlaceholderText="Raising element"
Text="Center"/>
</utu:ShadowContainer>

<utu:ShadowContainer Shadows="{StaticResource NeumorphismRaising}"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch">
<TextBox Padding="10"
Background="{StaticResource UnoColor}"
BorderThickness="0"
CornerRadius="20"
Foreground="White"
HorizontalAlignment="Right"
VerticalAlignment="Center"
PlaceholderForeground="LightGray"
PlaceholderText="Raising element"
Text="Right"/>
</utu:ShadowContainer>


<utu:ShadowContainer Shadows="{StaticResource NeumorphismHollow}"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch">
<TextBox Padding="10"
Background="{StaticResource UnoColor}"
BorderThickness="0"
CornerRadius="20"
Foreground="White"
HorizontalAlignment="Right"
VerticalAlignment="Top"
PlaceholderForeground="LightGray"
PlaceholderText="Raising element"
Text="Right Top "/>
</utu:ShadowContainer>


<utu:ShadowContainer Shadows="{StaticResource NeumorphismRaising}"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch">
<TextBox Padding="10"
Background="{StaticResource UnoColor}"
BorderThickness="0"
CornerRadius="20"
Foreground="White"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
PlaceholderForeground="LightGray"
PlaceholderText="Raising element"
Text="Left"
Margin="15,100,50,200"/>
</utu:ShadowContainer>


<utu:ShadowContainer Shadows="{StaticResource NeumorphismHollow}"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch">
<TextBox
Background="{StaticResource UnoColor}"
BorderThickness="0"
CornerRadius="20"
Foreground="White"
HorizontalAlignment="Stretch"
HorizontalAlignment="Left"
VerticalAlignment="Top"
PlaceholderForeground="LightGray"
PlaceholderText="Hollow element"
Text="Padding"
Padding="15,30,50,30"/>
Text="Left"
Margin="15,100,50,100"/>
</utu:ShadowContainer>
<utu:ShadowContainer Shadows="{StaticResource NeumorphismHollow}"
HorizontalAlignment="Center"
HorizontalContentAlignment="Center">
<TextBox
Background="{StaticResource UnoColor}"
BorderThickness="0"
CornerRadius="20"
Foreground="White"
HorizontalAlignment="Left"
VerticalAlignment="Top"
PlaceholderForeground="LightGray"
PlaceholderText="Hollow element"
Text="Left on ShadowContainer Center"
Padding="15,200,50,100"/>
</utu:ShadowContainer>
</StackPanel>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class HexToColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
return value.ToString();
return value == null ? "" : value.ToString();
}

public object ConvertBack(object value, Type targetType, object parameter, string language)
Expand Down
Loading

0 comments on commit 9f30290

Please sign in to comment.