Click here to Skip to main content
15,886,067 members
Articles / Web Development / HTML

Signum Framework Tutorials Part 2 – Southwind Logic

Rate me:
Please Sign up or sign in to vote.
4.45/5 (6 votes)
15 Nov 2012LGPL325 min read 31.3K   1K   22  
In this part, we will focus on writing business logic, LINQ queries and explain inheritance
<m:EntityBase
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:m="clr-namespace:Signum.Windows"
    x:Class="Signum.Windows.EntityLine"
    x:Name="me" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="332.993" 
    
    Style="{DynamicResource toolTip}">
	<m:EntityBase.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="../Resources.xaml"/>
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</m:EntityBase.Resources>

	<Grid>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="Auto"/>
			<ColumnDefinition/>
			<ColumnDefinition Width="Auto"/>
		</Grid.ColumnDefinitions>
		<Label Content="{Binding Path=LabelText, ElementName=me, Mode=Default}" VerticalContentAlignment="Center" HorizontalAlignment="Left" 
		Target="{Binding ElementName=cc, Mode=OneWay}" Width="{Binding Path=(m:Common.LabelWidth), ElementName=me, Mode=OneWay}"
		 Visibility="{Binding ElementName=me, Path=(m:Common.LabelVisible), Converter={x:Static m:Converters.BoolToVisibility}}"/>
		<Border Grid.ColumnSpan="1" Grid.Column="1" Margin="1,1,1,1" Padding="3,0,3,0"  
                SnapsToDevicePixels="True" BorderBrush="{DynamicResource BlueBorder}" 
                BorderThickness="1,1,1,1" CornerRadius="3,3,3,3" Background="{DynamicResource BlueBackground}" 
                x:Name="border" Grid.IsSharedSizeScope="False">
            <Grid>
                <ContentControl 
                    x:Name="cc" Focusable="True" 
                    PreviewKeyDown="cc_PreviewKeyDown" 
                    MouseDoubleClick="cc_MouseDoubleClick" 
                    MouseDown="cc_MouseDown"
                    GotFocus="cc_GotFocus"
                    ContentTemplate="{Binding Path=EntityTemplate, ElementName=me, Mode=Default}" 
                    Content="{Binding Path=Entity, ElementName=me, Mode=OneWay}" 
                    HorizontalContentAlignment="Left" 
                    VerticalContentAlignment="Center"
                    HorizontalAlignment="Stretch" 
                    VerticalAlignment="Stretch" />
                <m:AutoCompleteTextBox 
                    x:Name="autoCompleteTextBox"
                    AutoCompleting="autoCompleteTextBox_AutoCompleting" 
                    Closed="autoCompleteTextBox_Closed"
                    Visibility="Hidden"/>
            </Grid>
            <!--HorizontalContentAlignment="Center"
                VerticalContentAlignment="Center"  />-->
		</Border>
		<StackPanel Orientation="Horizontal" Grid.Column="2" x:Name="buttons">
			<Button Focusable="False" x:Name="btCreate" Click="btCreate_Click" Style="{StaticResource RoundButton}" Content="{StaticResource Create}" ToolTip="{m:Loc Create}"/>
			<Button Focusable="False" x:Name="btFind" Click="btFind_Click" Style="{StaticResource RoundButton}" Content="{StaticResource Find}" ToolTip="{m:Loc Find}"/>
			<Button Focusable="False" x:Name="btView" Click="btView_Click" Style="{StaticResource RoundButton}" Content="{StaticResource View}" ToolTip="{m:Loc View}"/>
			<Button Focusable="False" x:Name="btRemove" Click="btRemove_Click" Style="{StaticResource RoundButton}" Content="{StaticResource Remove}" ToolTip="{m:Loc Remove}"/>
		</StackPanel>
	</Grid>

</m:EntityBase>

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 GNU Lesser General Public License (LGPLv3)


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