Oct 25 2009

Prism Quick Start Kit

I have been reading on Prism V2.0 for a while and today I found this extra useful resource delivered by David Hill:

Prism Quick Start Kit

 

The above Quick Start Kit provides a Visual Studio template to creating a Prism Module and Shell projects. In addition, David adds his 2 cents and provides a “Solution Template” using his templates + adding light functionality to the solution. The solution itself can be used as a base template for any Prism-based application you intend to develop.

 

Hope this helps,
Regards

Tags:

Oct 25 2009

Telerik Q3 2009 Teaser Video

Category:Bil@l @ 14:04

Check the video here: Telerik Q3 2009 Teaser Video

 

Regards

Tags:

Oct 21 2009

RadControls for Silverlight Q3 2009 Beta 2 v 2009.3.1019

Category:Bil@l @ 06:03

Changes on existing controls

RadGridView

What’s New:

  • Horizontal and vertical UI virtualization with container recycling added for rows and cells
  • All grid templates (rows, cells, etc.) lighten up
  • Extended Validation
    • Added metadata driven validation (via data annotations attributes)
    • Added more validation events that allow support for custom validation
  • Clipboard.IsEnabled property added
  • GridViewDynamicHyperlinkColumn and GridViewHyperlinkColumn added
  • GridViewImageColumn added
  • Introduced new property SelectionMode which specifies the selection behavior
  • Hierarchy support simplified and improved
  • PrintToHtml() method added
  • GroupFooterTemplate added for GridViewColumn
  • GridViewToggleRowDetailsColumn added

What’s Fixed:

  • Null reference exception when calling ReorderColumns in DataLoaded is now fixed
  • Cell's content was not displayed when GridView was bound to list of primitive types is now fixed
  • IsFilteringAllowed cannot be changed with Binding runtime is now fixed
  • SelectionChanged event is no longer raised when ItemsSource property is changed
  • Memory leak in FilteringDropDown is now fixed
  • Header row not exported correctly if the grid is grouped is now fixed
  • Exception with exporting of grouped grid with null values is now fixed
  • AutogenerateColumns property is now a DependencyProperty
  • Column cannot be replaced in AutoGeneratingColumn event

RadChart

What’s New:

  • Negative values – RadChart provides full negative values support for all relevant two-dimensional series types
  • Multiple Y axes support – RadChart adds a highly requested support for secondary and multiple Y axes. The new feature is useful when the values of the displayed data series vary a lot from one another or different types of data should be presented in one chart. The scale of each added Y axis corresponds to the associated data series and auto adjusts its range
  • Added support for two new Label Format Tokens useful for stacked chart series – STSUM (stacked sum – represents the sum of all stacked items for a given index) and STPERCENT (stacked percent – the percent representation of the value of a given item with respect to all stacked items for the respective index).

What’s Fixed:

  • Fixed an issue that prevented RadChart to correctly change its theme in runtime
  • Fixed an issue with setting AxisY.Step before AxisY.MinValue that resulted in incorrect axis range
  • Fixed an issue with missing axis titles in 3D chart types in some scenarios
  • Fixed an issue with skewed AxisX ticks in horizontal bar series types
  • Fixed an issue that prevented tooltips to support standard format expressions like "C2", "N2", etc.
  • Fixed an issue that prevented tooltip format customization for Range and financial series types
  • Fixed an issue that prevented setting the AxisX.Step property declaratively in XAML
  • Fixed an issue that prevented setting the AxisX.TicksDistance property declaratively in XAML
  • Fixed an issue that prevented setting GroupingSettings declaratively in XAML
  • Fixed NullReferenceException with grouping and aggregation when grouping by data field containing null values
  • Fixed NullReferenceException with custom chart layout in some scenarios

RadTreeView

What’s New:

  • UI Virtualization (vertical only)
  • CheckBoxes and BringIntoView support
  • Added SingleExpandPath functionality

RadScheduler

What’s New:

  • Standard Resources have been added to the Appointment and Edit Appointment dialogs:
    • Category
    • Importance
    • TimeMarker
  • All-day area improvements
  • Added properties for implementing read-only scheduler:
    • IsReadOnly
    • IsBackAndForwardNavigationEnabledImportance
    • IsViewModeNavigationEnabled
  • Added properties to the Resource type for colorizing appointments when grouped:
    • ResourceBrush
    • AppointmentBrush
    • MouseOverAppointmentBrush
    • SelectedAppointmentBrush

RadDocking

What’s New:

  • RadDocking now uses RadToggleButton and RadContextMenu instead of RadMenu
  • All Close and Pin buttons are replaced by RadButtons
  • If RadPane’s Header property is null and there is no binding, the Header is automatically bound to the Title property (if not null) or vice versa
  • The Compass property has been added to the PreviewShowCompassEventArgs class. The value of this property is a reference to the compass that will be shown
  • The PreviewShowCompass event is also fired for the RootCompass
  • IsLeftIndicatorVisible, IsTopIndicatorVisible, IsRightIndicatorVisible, IsBottomIndicatorVisible, IsCenterIndicatorVisible properties have been added to the Compass class. These properties allow you to show or hide parts of both the Compass and RootCompass controls
  • States compass parts visibility are added
  • When the pane is in the DocumentHost area the title of the tab item displays the Header property with the HeaderTemplate (before the Title property with the HeaderTemplate was displayed)
  • HasDocumentHost property has been added, RadDocking now supports RadSplitContainer as the last child

What’s Fixed:

  • The TitleTemplateSelector property of the RadPane has been removed
  • DockingPanel does not inherit from RadDockPanel anymore

RadRibbonBar

What’s New:

  • Added two new themes – Office Black and Office Silver
  • RibbonButtons support Commands with Parameter and Target

RadOutlookBar

What’s Changed:

  • RadOutlookBar now updates its Title after item has dynamically changed its Header
  • Added two new themes – Office Black, Office Silver, Office Blue, Summer, Vista

RadMaskedTextBox

What’s Fixed:

  • Setting the value of a standard mask used to not clear the mask beyond the changed characters

RadSlider

What’s Fixed:

  • Fixed issue with hardcoded Margin and MinWidth in RadSlider’s ControlTemplate. When the width was less than 56px, RadSlider would clip itself

RadHTMLPlaceHolder

What’s New:

  • SourceUrl can now be use with binding

RadButtons

What’s New:

  • New button type has been added – RadSplitButton
  • Commands support with Parameter and Target

Tags:

Oct 20 2009

Silverlight Toolkit October 2009

Category:Bil@l @ 08:58

A new release of the Silverlight Toolkit has been issued this month.

Read more here: http://silverlight.codeplex.com/

 

Regards

Tags:

Sep 30 2009

Telerik Launches Marketplace for Sitefinity ASP.NET CMS Add-ons

Category:Bil@l @ 18:00

Telerik Launches Marketplace for Sitefinity ASP.NET CMS Add-ons

 

WALTHAM, MA, September 28, 2009 - Telerik, a leading vendor of development tools and user interface components for .NET, announced today the launch of a new marketplace for add-ons for its Sitefinity ASP.NET content management system (CMS). The marketplace will allow the rapidly growing Sitefinity community to share and sell controls, modules, themes and templates for Sitefinity ASP.NET CMS.   In addition, the marketplace will offer a number of free tools and resources contributed by Sitefinity MVPs and community members that are available for immediate download including ‘Site Map’ control, ‘Tab Links,’ ‘What’s New’ control and many others.

Telerik also announced a community wide call for submissions to the marketplace.  Developers submitting an add-on by the end of October will be eligible to win prizes including a free Sitefinity license. Submissions can be made at: http://www.sitefinity.com/marketplace/submit-module.aspx
“We are really excited that Telerik is providing this opportunity for its partners and community in general,” said Steve Miller, CEO of Mallsoft, a web design and development firm located in San Diego, California. “We have a number of add-ons developed especially for Sitefinity CMS that we hope will generate some interest. We are also looking forward to being able to explore the work of other developers. With Sitefinity being such an open, robust platform and so easily extendable, we are sure there are some really amazing add-ons out there.”
“We think this will be a great opportunity for members of the Sitefinity community to not only showcase their work but also benefit from the work of others,” said Martin Kirov, Sitefinity Partner Manager. “Sitefinity CMS is well liked by developers for its flexibility and extensibility, so we are confident that the number of items available in the marketplace will grow rapidly.”

About Sitefinity CMS
Sitefinity CMS is a flexible ASP.NET-based content management platform that can be used for the construction and management of commercial websites, community portals, intranets, and personal blogs. The product's unique architecture leverages the .NET development patterns including master pages, templates, standard user controls, themes and CSS.

About Telerik
Telerik is a leading vendor of development tools and components for the Microsoft .NET platform. Developers from most of the Fortune 2000 companies, many of the world’s leading educational and non-profit organizations, and thousands of consultants rely on Telerik products to build applications with unparalleled richness, responsiveness and interactivity.

Tags:

Sep 26 2009

Telerik Sitefinity 3.7 SP1 – Links & Tutorials

Category:Bil@l @ 13:03

If you are like me starting to learn and use Telerik Sitefinity then you should have a look at the following resources Telerik provides you with:

  1. Video Tutorials
  2. Webniars
  3. Knowledge Base (KB)
  4. Code Library

Telerik Sitefinity comes in two flavors:

  1. Standard Edition
  2. Community Edition

So here again guys/girls in Microsoft user groups, you can make your life a heaven by using the community edition (FREE)!!!

 

Hope this helps,
Regards

Tags:

Sep 25 2009

The 2nd Place Winner - Telerik Silverlight Contest

Category:Bil@l @ 21:45

As you know there have been a Silverlight Contest moderated by Telerik for the best Silverlight application developed based on Telerik’s products.

My application took the 2nd place! Here are the results (http://www.telerik.com/community/silverlight-contest.aspx)

 

Thank you all for your support and vote!
Best Regards

 

 

The 1st place winner is

Ad-Hoc Reports for Enterprise Portfolio Simulator

Submitted by Kevin Jacobson from ProModel Corporation

Congratulations and thank you for your participation! Your project received the highest rating ( 3.4 of 4) and the $500 Amazon Gift Certificate goes to you! Please check your e-mail inbox for the award.

 

The 2nd place winner is

VBC Shortcuts

Developed by Bilal Haidar from Consolidated Contractors Company

Congratulations and thank you for your participation! Your project received the second best rating ( 3.1 of 4) and the $300 Amazon Gift Certificate goes to you! Please check your e-mail inbox for the award.

 

The 3rd place winners are

Both EGUMPP and House Hotel received rates of 2.8 of 4 after the community voting. Hence, their authors will share the third place award and will each receive a $100 Amazon Gift Certificate. Congratulations and thank you for your participation! Please check your e-mail boxes for the awards.

Tags:

Sep 21 2009

Telerik Sales Dashboard - Abide by Prism!

Category: Prism 2.0 | silverlight 2.0 | Telerik ControlsBil@l @ 22:32
There is no doubt that once you finish reading the Prism 2.0 (Composite Application Library) and try out all of the quick starts that accompany the guidance; it is a must to check out the Telerik Sales Dashboard. (http://demos.telerik.com/silverlight/salesdashboard)

Telerik not only pioneering in control development that targets the Microsoft .Net framework but also in educating developers all around the world with their extra efforts of:

  1. Code library
  2. Free software
  3. Extensive documentation
  4. Flash-Quick customer support
  5. Telerik labs
  6. Free Open-source projects

 

One of those major educating applications that Telerik delivers is the Telerik Sales Dashboard. It has been built on top of WPF and Silverlight keeping in mind the MVVM design pattern (Model-View-ViewModel) and Prism (Modularity, UI composition, global events, commanding, etc …)

You can download the source code to check it out and learn from it here (link)

In the whitepaper that accompanies in the Dashboard, I read the following:

PeriodSelector Module

This module handles the task of displaying a RadCalendar in a popup that can be used to select a range of dates for filtering data displayed in other modules. To close the popup containing the RadCalendar control when the user clicks outside of it, we subscribe to the MouseLeftButtonUp event of the RootVisual element of the application. We do not use the MouseLeftButtonDown event because it is used and handled internally by most controls and thus it is inappropriate for our purpose.

Also, we need to bind several properties of UI elements in this module to properties defined in the code-behind of the view, which are then in turn bound to properties in the viewmodel. This code-behind binding is necessary because the project requirements are not achievable with the XAML bindings available in Silverlight. This is a deviation from the Prism guidance, but, as already established, patterns should not be followed blindly if they block application requirements.

I found some code in the PeriodSelectorView.xaml.cs file that shouldn’t be present in a typical Prism application however, as it has been established in the Dashboard’s whitepaper, we shouldn’t follow a design pattern blindly if it blocks our work.

However, the code behind that was present could be replaced by implementing a new CommandBehavior that targets the RadCalendar. That was the first part of moving the code from code-behind into the PeriodSelectorViewModel.cs file. The other part is hooking up to the System.Windows.Application.Current.RootVisual.MouseLeftButtonUp  event inside the ViewModel file itself. The second part is easy and straight forward, so I will focus on the first one.


using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Data;
using System.Collections;

namespace Telerik.SalesDashboard.PeriodSelector
{
public partial class PeriodSelectorView : UserControl
{
public PeriodSelectorView(PeriodSelectorViewModel viewModel)
{
InitializeComponent();
this.DataContext = viewModel;

Binding b = new Binding();
b.Mode = BindingMode.TwoWay;
b.Path = new PropertyPath("CalendarSelectedDates");
this.SetBinding(PeriodSelectorView.SelectedDatesProperty, b);
calendar.SelectionChanged += (s, e) => this.SelectedDates = calendar.SelectedDates.ToList();
}

public IList SelectedDates
{
get
{
return (IList)this.GetValue(SelectedDatesProperty);
}
set
{
this.SetValue(SelectedDatesProperty, value);
}
}

// Using a DependencyProperty as the backing store for SelectedDates. This enables animation, styling, binding, etc...
public static readonly DependencyProperty SelectedDatesProperty =
DependencyProperty.Register("SelectedDates", typeof(IList), typeof(PeriodSelectorView), null);
}
}

What has been done above is:

  1. Define SelectedDates as a Dependency property on the View itself
  2. Define CalendarSelectedDates as a property on the ViewModel class
  3. Define a Binding between the above two properties
  4. Hooking up to the SelectionChanged event of the RadCalendar to fill the SelectedDates property hence filling the CalendarSelectedDates property.

 

The above was a way to hook into RadCalendar control on the View to retrieve selected dates and pass back the value to the ViewModel.

Now, what I did was:

     1. Removing all code-behind from the View

     2. Define a new DelegateCommand as follows:     

public ICommand CalendarSelectedCommand { get; private set; }
      3.  Instantiate the DelegateCommand as follows:
        this.CalendarSelectedCommand = new DelegateCommand<IList>(OnCalendarSelectionChanged);
private void OnCalendarSelectionChanged(IList args)
{
this.CalendarSelectedDates = args;
}

             4. Implemented a new RadCalendarCommandBehavior class.  As you know in Prism the CommandBevaior class does many things among which are:

a. Adds Commanding behavior into a Control

b. Defines the Command, CommandParameter and CommandBehavior attached properties that can be hooked to a Control.

c. Plays the role of proxy between Command definition and Control that the command is defined on where it attaches to a specific event of a Control and defines the event handler for that event, so that when the event is fired, the command is being called and executed.

Now, firing the event of a Control causes the attached event handler defined inside the CommandBehavior to fire. Usually this event handler calls the Execute method of the CommandBehavior that internally delegates the call to the Execute method on the Command it defines as a Dependency property.

Thus you can see how important the CommandBehavior class in attaching a Command behavior into a Control.

The Prism ships with the ClickCommandBehavior class only. When I saw the code written inside PeriodSelectorView.xaml.cs I realized that all what I need is create a RadCalendarCommandBehavior.cs class that attaches a new Command into the RadCalendar class by hooking into the RadCalendar.SelectionChanged event.

The purpose is to fire a command on the RadCalendar that can be handled inside the PeriodSelectorViewModel.cs class where I can easily retrieve the selected dates and hence no need for the mediator SelectedDates dependency property inside the View and no need for accessing the RadCalendar.SelectionChanged event. The goal is the same however, the “how” is the different and I believe using commands is more elegant!

I will not go into the details of creating the RadCalendarCommandBehavior class, the code is straight forward based on Prism knowledge


using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Practices.Composite.Presentation.Commands;
using Telerik.Windows.Input;
using Telerik.Windows.Controls;
using System.Linq;
using System.Collections;

namespace Telerik.SalesDashboard.PeriodSelector
{
public class RadCalendarCommandBehavior : CommandBehaviorBase<RadCalendar>
{
public RadCalendarCommandBehavior(RadCalendar source)
: base(source)
{
source.SelectionChanged += new Telerik.Windows.Controls.SelectionChangedEventHandler(source_SelectionChanged);
}

void source_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
{
var calendar = sender as RadCalendar;
if (calendar != null)
{
this.Command.Execute(calendar.SelectedDates.ToList());
}
}
}

public static class SelectionChanged
{
private static readonly DependencyProperty SelectionChangedCommandBehaviorProperty = DependencyProperty.RegisterAttached(
"SelectionChangedCommandBehavior",
typeof(RadCalendarCommandBehavior),
typeof(SelectionChanged),
null);

public static readonly DependencyProperty CommandProperty = DependencyProperty.RegisterAttached(
"Command",
typeof(ICommand),
typeof(SelectionChanged),
new PropertyMetadata(OnSetCommandCallback));

public static readonly DependencyProperty CommandParameterProperty = DependencyProperty.RegisterAttached(
"CommandParameter",
typeof(object),
typeof(SelectionChanged),
new PropertyMetadata(OnSetCommandParameterCallback));


public static void SetCommand(RadCalendar calendar, ICommand command)
{
calendar.SetValue(CommandProperty, command);
}

public static ICommand GetCommand(RadCalendar calendar)
{
return calendar.GetValue(CommandProperty) as ICommand;
}

public static void SetCommandParameter(RadCalendar calendar, object parameter)
{
calendar.SetValue(CommandParameterProperty, parameter);
}

public static object GetCommandParameter(RadCalendar calendar)
{
return calendar.GetValue(CommandParameterProperty);
}

private static void OnSetCommandCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
{
RadCalendar calendar = dependencyObject as RadCalendar;
if (calendar != null)
{
RadCalendarCommandBehavior behavior = GetOrCreateBehavior(calendar);
behavior.Command = e.NewValue as ICommand;
}
}

private static void OnSetCommandParameterCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
{
RadCalendar calendar = dependencyObject as RadCalendar;
if (calendar != null)
{
RadCalendarCommandBehavior behavior = GetOrCreateBehavior(calendar);
behavior.CommandParameter = e.NewValue;
}
}

private static RadCalendarCommandBehavior GetOrCreateBehavior(RadCalendar calendar)
{
RadCalendarCommandBehavior behavior = calendar.GetValue(SelectionChangedCommandBehaviorProperty) as RadCalendarCommandBehavior;
if (behavior == null)
{
behavior = new RadCalendarCommandBehavior(calendar);
calendar.SetValue(SelectionChangedCommandBehaviorProperty, behavior);
}

return behavior;
}
}
}

5. What is left is to add the following into the PeriodSelectorView.xaml:

a.       Add a new XML namespace reference into the header of the UserControl:

xmlns:MyCommands="clr-namespace:Telerik.SalesDashboard.PeriodSelector"
  <telerikInput:RadCalendar …  MyCommands:SelectionChanged.Command="{Binding CalendarSelectedCommand}"   … />

That’s all what you need to do to remove the code-behind from the PeriodSelectorView into the PeriodSelectorViewModel !

 

If you find that the above can be improved, or anything you find you couldn’t understand, or you think is not suitable, etc … Please don’t hesitate to contact me at: bhaidar @ gmail.com

Regards

 

Tags: , ,

Sep 17 2009

Telerik Silverlight Contest

Category:Bil@l @ 09:19

Dear all,

I participated lately in a Silverlight compeition moderated by Telerik corporation.

Voting has started and would like you to vote for my application "VBC Shortcuts - CCC"

 http://www.telerik.com/community/silverlight-contest.aspx

Thank you for your help and support.
Regards

Tags:

Sep 10 2009

TFS Work Item Manager &amp; TFS Project Dashboard Beta

Category: TelerikBil@l @ 16:09

Telerik release two new FREE products:

  1. TFS Work Item Manager
  2. TGS Project Dashboard

Get more details from here: TFS Work Item Manager and TFS Project Dashboard 

 

Regards

 

 

Tags: