Click here to Skip to main content
15,897,226 members
Articles / Desktop Programming / WPF

GoalBook - A Hybrid Smart Client

Rate me:
Please Sign up or sign in to vote.
4.86/5 (24 votes)
25 Sep 2009CPOL10 min read 79.5K   834   69  
A WPF hybrid smart client that synchronises your goals with the Toodledo online To-do service.
<UserControl x:Class="GoalBook.Tasks.Views.TasksDialogView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Toolkit="http://schemas.microsoft.com/wpf/2008/toolkit"
    xmlns:Time="clr-namespace:GoalBook.Tasks.Controls"
    xmlns:ModuleProperties="clr-namespace:GoalBook.Tasks.Properties"
    xmlns:gbInfrastructure="clr-namespace:GoalBook.Infrastructure;assembly=GoalBook.Infrastructure"     
    Width="400" 
    Background="White"
    Loaded="UserControl_Loaded">	
	<Grid Name="tasksDialogGrid">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="*"></ColumnDefinition>
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition></RowDefinition>
			<RowDefinition></RowDefinition>			
		</Grid.RowDefinitions>
		<Grid Grid.Row="0" Margin="10,10,10,5" Height="Auto" Width="Auto">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="75"></ColumnDefinition>								
				<ColumnDefinition Width="*"></ColumnDefinition>							
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="60"></RowDefinition>				
				<RowDefinition Height="30"></RowDefinition>				
			</Grid.RowDefinitions>
			<Label Name="labelTitle" Grid.Row="0" Grid.Column="0" Content="{x:Static ModuleProperties:Resources.LabelTitle}"/>				
			<Label Name="labelFolder" Grid.Row="1" Grid.Column="0" Content="{x:Static ModuleProperties:Resources.LabelFolder}"/>						
			<TextBox Name="textBoxTitle" BorderBrush="SlateGray" Margin="2" Grid.Row="0" Grid.Column="1" Grid.RowSpan="1" Grid.ColumnSpan="1" MaxLength="255"
				AcceptsReturn="False" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" Text="{Binding Path=EditTask.Title, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
			<ComboBox Name="comboBoxFolder" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="1" Margin="2,5,2,0"  
				ItemsSource="{Binding Path=FolderList}" 
				DisplayMemberPath="Value"  
				SelectedValuePath="Key" 
				SelectedValue="{Binding Path=EditTask.FolderID}"/>							
		</Grid>		
		<Grid Grid.Row="1" Margin="10,5,10,10" Height="Auto" Width="Auto">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*"></ColumnDefinition>
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition></RowDefinition>
			</Grid.RowDefinitions>
			<TabControl Grid.Row="0" Grid.Column="0" TabStripPlacement="Top" Margin="0,10,0,0">
				<TabItem Header="{x:Static ModuleProperties:Resources.LabelSchedule}">
					<Grid Margin="5,5,5,5" Height="Auto" Width="Auto">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="*"></ColumnDefinition>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="60"></RowDefinition>
						</Grid.RowDefinitions>
						<Grid Grid.Row="0" Grid.RowSpan="1">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="50"></ColumnDefinition>
								<ColumnDefinition Width="2*"></ColumnDefinition>
							</Grid.ColumnDefinitions>
							<Grid.RowDefinitions>
								<RowDefinition Height="30"></RowDefinition>
								<RowDefinition Height="30"></RowDefinition>
							</Grid.RowDefinitions>
							<Label Name="labelDate" Grid.Row="0" Grid.Column="0" Content="{x:Static ModuleProperties:Resources.LabelDueDate}"/>
							<Label Name="labelTime" Grid.Row="1" Grid.Column="0" Content="{x:Static ModuleProperties:Resources.LabelDueTime}"/>
							<Toolkit:DatePicker Name="dueDatePicker" SelectedDate="{Binding Path=EditTask.Due, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" 
									Margin="2" Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="1">
							</Toolkit:DatePicker>
							<Time:TimeControl SelectedTime="{Binding Path=EditTask.DueTime, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
									Margin="0,2,0,2" Grid.Row="1" Grid.Column="2" />
						</Grid>
					</Grid>
				</TabItem>
			</TabControl>
		</Grid>
	</Grid>
</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)
Australia Australia
I've been working as a software developer since 2000 and hold a Bachelor of Business degree from The Open Polytechnic of New Zealand. Computers are for people and I aim to build applications for people that they would want to use.

Comments and Discussions