Click here to Skip to main content
15,886,199 members
Articles / Web Development / ASP.NET

Signum Framework Principles

Rate me:
Please Sign up or sign in to vote.
4.74/5 (27 votes)
25 Jul 2011CPOL18 min read 98.9K   1.1K   86  
Explains the philosophy behind Signum Framework, an ORM with a full LINQ Provider that encourages an entities-first approach.
<UserControl x:Class="Signum.Windows.LeftNavigationPanel"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:m="clr-namespace:Signum.Windows"
    Height="Auto" Width="Auto" 
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" MaxWidth="180" d:DesignHeight="258.5" d:DesignWidth="153">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Resources.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <UserControl.Background>
        <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
            <GradientStop Color="#FFFFFFFF" Offset="0"/>
            <GradientStop Color="#FFC9E4FF" Offset="1"/>
        </LinearGradientBrush>
    </UserControl.Background>
    <Expander x:Name="expander" DockPanel.Dock="Left" IsExpanded="True" ExpandDirection="Right" IsEnabled="True" HorizontalAlignment="Stretch">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Border x:Name="borderQuickLinks" BorderBrush="#FF0074FF" BorderThickness="2,2,2,2" CornerRadius="5,5,5,5" Margin="10,10,10,10" Grid.Row="0" >
                <Grid >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" MinHeight="20"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Border CornerRadius="3,3,3,3" Grid.Row="0">
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                <GradientStop Color="#FF0074FF" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.Background>
                        <TextBlock Text="{m:Loc Links}" HorizontalAlignment="Center" FontWeight="Bold"/>
                    </Border>


                    <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Margin="5,5,5,5" Grid.Row="1">
                        <ItemsControl x:Name="lvQuickLinks">
                            <ItemsControl.ItemTemplate>
                                <DataTemplate>
                                    <Button Tag="{Binding Path=Action}" Content="{Binding Path=Label}" Style="{DynamicResource LinkButtonStyle}"  HorizontalAlignment="Left" VerticalAlignment="Top" Cursor="Hand" Margin="0,2,0,2"/>
                                </DataTemplate>
                            </ItemsControl.ItemTemplate>
                        </ItemsControl>
                    </ScrollViewer>
                </Grid>
            </Border>
            <Image HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,0" Source="Images/star.png" Stretch="None" Grid.Row="0" Visibility="{Binding Path=Visibility, ElementName=borderQuickLinks, Mode=Default}"/>

            <Border x:Name="borderNotas" Margin="10,10,10,10" Background="#FFFFE793" BorderBrush="#FFFFD74D" BorderThickness="2,2,2,2" CornerRadius="5,5,5,5" Grid.Row="1" MinHeight="40">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" MinHeight="20"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto" MinHeight="20"/>
                    </Grid.RowDefinitions>

                    <Border CornerRadius="3,3,3,3" Grid.Row="0">
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                <GradientStop Color="#00FFE793" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.Background>
                        <TextBlock Text="{m:Loc Notes}" HorizontalAlignment="Center" FontWeight="Bold" FontFamily="Comic Sans MS" x:Name="tbNotas"/>
                    </Border>

                    <Border Grid.Row="1">
                        <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Margin="5,5,5,5" Grid.Row="1">
                            <ItemsControl x:Name="lvNotas">
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <Button Content="{Binding Path=ToStr}" Tag="{Binding}"  Style="{DynamicResource LinkButtonStyle}"  FontFamily="Comic Sans MS" HorizontalAlignment="Left" VerticalAlignment="Top" Cursor="Hand" Margin="0,2,0,2"/>
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </ItemsControl>
                        </ScrollViewer>
                    </Border>
                    <Border CornerRadius="3,3,3,3" Grid.Row="2">
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#00FFE793" Offset="0.009"/>
                                <GradientStop Color="#FFE2BD37" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.Background>
                        <Button x:Name="btnNewNote" Click="btnNewNote_Click" Content="{m:Loc NewNote}" Style="{DynamicResource LinkButtonStyle}" HorizontalAlignment="Right" VerticalAlignment="Top" FontFamily="Comic Sans MS" Foreground="#FF077500" Margin="5,0,5,0" />
                    </Border>
                </Grid>
            </Border>
            <Image  HorizontalAlignment="Left" Margin="0,0,0,0" Source="Images/pin.png" Stretch="None" VerticalAlignment="Top" Grid.Row="1" Visibility="{Binding Path=Visibility, ElementName=borderNotas, Mode=Default}"/>
        </Grid>
    </Expander>
</UserControl>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Signum Software
Spain Spain
I'm Computer Scientist, one of the founders of Signum Software, and the lead developer behind Signum Framework.

www.signumframework.com

I love programming in C#, Linq, Compilers, Algorithms, Functional Programming, Computer Graphics, Maths...

Comments and Discussions