VIBlend

VIBlend Controls for Silverlight ver. 2.6 - Released

by viblend 21. June 2010 20:37

VIBlend is pleased to announce the immediate availability of VIBlend Controls for Silverlight ver. 2.6. The new version includes several important updates to the company's Silverlight suite.

 Highlights of the new features and improvements in the new version are:

  • Visual Studio 2010 toolbox integration
  • Right Click support in DataGrid
  • DataGrid sorting and filtering using a Context Menu
  • DataGrid performance optimizations
  • Improved DataGrid Office2010 themes
  • Turned off DataGrid deferred scrolling feature by default.
  • Fixed a design time issue in the Menu control.
  • Fixed a design time issue in the TreeView control.
  • Fixed a Stretch alignment issue in the DataGrid control.

See our Silverlight Controls Live Demo and Download a free trial today.

Currently rated 4.7 by 3 people

  • Currently 4.666667/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Silverlight | Silverlight Controls

How to create a scrollable Menu in Silverlight

by viblend 8. May 2010 18:30

In case the available height is too small to accommodate a group of menu items, the group becomes scrollable.  Each menu item has a DropDownHeight and VerticalScrollBarVisibility properties. The DropDownHeight property is used to restrict the displayed height of a group of menu items, while the VerticalScrollBarVisibility property defines whether the item allows vertical scrolling or not.

The following code example demonstrates how to create a scrollable menu.

[XAML]

         <viblend:Menu Name="Menu" Width="400" Height="20">
                <viblend:MenuItem RootNormalForeBrush="Black" DropDownHeight="150" VerticalScrollBarVisibility="Visible" Text="File">
                    <viblend:MenuItem Text="Mail Message" ImageSource="images/mail.png"/>
                    <viblend:MenuItem Text="Note" ImageSource="images/Note.png"/>
                    <viblend:MenuItem Text="Contact" ImageSource="images/contact.png" />
                    <viblend:MenuItem Text="Appointment" ImageSource="images/Appointment.png"/>
                    <viblend:MenuItem Text="Task" ImageSource="images/Task.png" />
                    <viblend:MenuItem Text="Folder" ImageSource="images/folder.png"/>
                </viblend:MenuItem>
            </viblend:Menu>

VIBlend Menu for Silverlight is a free component that is part of the VIBlend Controls for Silverlight package.

VIBlend Silverlight Controls - ver. 2.0 Released

by viblend 3. March 2010 05:26

We are proud to announce the second major release of VIBlend Controls for Silverlight.

With the new release, VIBlend has officially included in the suite four new controls – OutlookPane, NavigationPane, DateTimePicker and ScrollablePanel. Not only we introduced new controls, but we also improved the quality and functionality of the existing ones and added over 10 new examples to show how our controls work.

The Menu and Context Menu controls from the toolset are now provided free of charge to all registered users.

See our Silverlight Controls Live Demo and Download a free trial today.

Editable Data Grid entirely in XAML

by viblend 16. January 2010 18:08

This example demonstates how to create a nicely formatted, editable DataGrid in Silverlight entirely in XAML.

The grid will bind to a list of books. The schema of data source contains the following DataFields / Properties: BookTitle (string), ISBN (string), Author (string), IsInStock(bool).

We'll make the Title editable using a TextBox in-place editor. We'll use a CheckBox DataTemplate for the IsInStock flag and respectively use a CheckBox CellEditTemplate for in-place edit.

XAML:

<UserControl x:Class="SilverlightApplication1.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="292" d:DesignWidth="820"
    xmlns:viblend="clr-namespace:VIBlend.Silverlight.Controls;assembly=DataGrid">
   
    <UserControl.Resources>
        <!-- DataTemplate for TextBox in-place editor -->
        <DataTemplate x:Name="cellEditTextBoxTemplate">
            <TextBox Text="{Binding BookTitle, Mode=TwoWay}"/>
        </DataTemplate>
       
        <!-- DataTemplate for CheckBox in-place editor -->
        <DataTemplate x:Name="cellEditCheckBoxTemplate">
            <Grid>
                <CheckBox IsChecked="{Binding IsInStock, Mode=TwoWay}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Grid>
        </DataTemplate>
       
        <!-- DataTemplate for CheckBox column -->
        <DataTemplate x:Name="cellCheckBoxTemplate">
            <Grid>
                <CheckBox IsChecked="{Binding IsInStock}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Grid>
        </DataTemplate>
    </UserControl.Resources>
   
    <Grid x:Name="LayoutRoot" Background="White">
        <viblend:DataGrid Name="dataGrid1" Height="250" Width="400">
            <viblend:DataGrid.BoundFields>
                <viblend:BoundField Text="Book Title" DataField="BookTitle" Width="100" CellEditTemplate="{StaticResource cellEditTextBoxTemplate}" CellEditorActivationFlags="MOUSE_CLICK_SELECTED_CELL" CellEditorDeActivationFlags="MOUSE_CLICK" />
                <viblend:BoundField Text="ISBN" DataField="ISBN" Width="80"/>
                <viblend:BoundField Text="Author" DataField="Author" Width="80" SortMode="Automatic" />
                <viblend:BoundField Text="In Stock" DataField="IsInStock" Width="40" SortMode="Automatic" CellDataTemplate="{StaticResource cellCheckBoxTemplate}" CellEditTemplate="{StaticResource cellEditCheckBoxTemplate}" CellEditorActivationFlags="MOUSE_MOVE" CellEditorDeActivationFlags="MOUSE_MOVE"/>
            </viblend:DataGrid.BoundFields>
        </viblend:DataGrid>
    </Grid>
</UserControl>

 C#:

 You can use the following code to quickly generate sample data and test the example:

namespace SilverlightApplication1
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();

            PrepareGridData();

            dataGrid1.ItemsSource = listBooks;
        }

        public class Book
        {
            public Book(string title, string isbn, string author, bool inStock)
            {
                this.BookTitle = title;
                this.ISBN = isbn;
                this.Author = author;
                this.IsInStock = inStock;
            }

            public string BookTitle {get;set;}
            public string ISBN {get;set;}
            public string Author { get; set; }
            public bool IsInStock { get; set; }
        }

        public List<Book> listBooks = new List<Book>();

        private void PrepareGridData()
        {
            Random rand = new Random();
            for (int i = 0; i < 1000; i++)
            {
                int val = rand.Next();
                listBooks.Add(new Book("Title " + i, "ISBN " + i, "Author " + i, val % 2 == 0));
            }
        }
    }
}

 And here is the result:

Editable Silverlight Grid

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

DataGrid | Silverlight

VIBlend Silverlight Controls - ver. 1.5 Released

by viblend 16. January 2010 17:43

We are happy to announce the immediate availability of VIBlend Silverlight Controls ver. 1.5

The majority of the changes in this release are concentrated on making the Silverlight Grid more robust and easy to use.

Here is the list of changes:

  • Bug Fixes

    • Fixed CellMouseUp event raising issue
    • Fixed RowsHierarchy SummaryItems visualization issue in compact style rendering
    • Fixed intermittent headers blink issue on cells mouse click

  • New features, improvements and new APIs  

    • Added new in-place cell editor activation flag: Click on Selected Cell
    • Added Hierarchy.GetChildItemsRecursive method
    • Added HierarchyItem.GetChildItemsRecursive method
    • Added HierarchyItem.Cells property
    • Added HierarchyItem.NonEmptyCells property
    • Added CellsArea.Clear method
    • Added CellsArea.NonEmptyCells property
    • Added CellsArea.Cells property
    • Added ability to format and style HierarchyItems and grid cells entirely in XAML in data bound mode

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

DataGrid | Silverlight

Creating a Pivot Table in Silverlight using XAML

by viblend 13. January 2010 17:21

New in version 1.4 of VIBlend Silverlight Controls is the ability to create a Pivot Table entirely in XAML.

As usual you have to specify which columns (data fields) from the data source will represent the pivot table's rows, columns and values fields.

Below is the full XAML required to declare a pivot table:

<UserControl x:Class="SilverlightApplication1.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="600" d:DesignWidth="800"
    xmlns:viblend="clr-namespace:VIBlend.Silverlight.Controls;assembly=DataGrid">

    <Grid x:Name="LayoutRoot" Background="White">
            <viblend:DataGrid AutoGenerateColumns="True" PivotValuesOnRows="False" Name="dataGrid1"  Height="200" Width="500">
                <viblend:DataGrid.BoundPivotRows>
                    <viblend:BoundField DataField="Country" Text="Country"/>
                    <viblend:BoundField DataField="Region" Text="Region"/>
                    <viblend:BoundField DataField="City" Text="City"/>
                </viblend:DataGrid.BoundPivotRows>
                <viblend:DataGrid.BoundPivotColumns>
                   <viblend:BoundField DataField="ShipperCompany" Text="Shipper Company"/>
                </viblend:DataGrid.BoundPivotColumns>
                <viblend:DataGrid.BoundPivotValues>
                    <viblend:BoundValueField DataField="ExtendedPrice" Text="Count of Sales" Function="Count"/>
                    <viblend:BoundValueField DataField="ExtendedPrice" Text="Amount of Sales" Function="Sum"/>
                    <viblend:BoundValueField DataField="ExtendedPrice" Text="Avg Sale Amount" Function="Average"/>
                </viblend:DataGrid.BoundPivotValues>
            </viblend:DataGrid>
    </Grid>
</UserControl>

After that simply bind to the data source by setting the ItemsSource property of the data grid control:

dataGrid1.ItemsSource = myData;

The result is a great looking pivot table with interactive drill down support.

VIBlend DataGrid for Silverlight uses a built-in OLAP engine to construct the pivot table. You can bind the DataGrid to any data source and easily build in-house Business Intelligence and reporting tools within minutes.

Currently rated 5.0 by 3 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

olap | olap grid | pivot grid | Silverlight

VIBlend Silverlight Controls – Announcing new version 1.3

by viblend 27. December 2009 19:37

We are proud to announce the release of the latest version of VIBlend Silverlight Controls.

The new edition includes many improvements in VIBlend’s OLAP Grid for Silverlight:

  • Significantly better performance
  • Lower memory use
  • Data binding improvements and LINQ support
  • Layout enhancements with variable height columns
  • Pivot table sorting by label
  • Better design time support in Visual Studio 2010 Beta

The release of version 1.3 brings a new Silverlight TreeView control loaded with advanced features, stylish animations and offering easy to use and flexible programming model.

See our Silverlight Controls Live Demo and Download a free trial today.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

olap | pivot | Silverlight | pivot grid | olap grid

Custom node Editors with VIBlend TreeView for Silverlight

by viblend 23. December 2009 19:12

Today, we are going to share with you how you can use custom editors in our brand new TreeView control. The process of assigning a custom editor includes three steps. The first step is to make the TreeView editable. To do that, set its EnableItemEdit property to true which will ensure that an edit operation will start over the Selected item when you press the F2 key.

<viblend:TreeView
   EnableItemEdit="True"
   Width="280"
   Height="350"
   Style="{StaticResource OfficeBlackTreeViewStyle}"
   VerticalAlignment="Center"
   HorizontalAlignment="Center"
   Background="White"
   x:Name="TreeView">

   <viblend:TreeViewItem 
      DisplayValue="Product - Espresso Truffle" 
      Style="{StaticResource OfficeBlackTreeViewItemStyle}" 
      EditTemplate="{StaticResource ComboBoxTemplate}"
      Value="Espresso Truffle">
   </viblend:TreeViewItem>
</viblend:TreeView>

The second step is to set the DisplayValue, Value and EditTemplate properties of the TreeViewItem in order to associate the custom editor with the specific TreeViewItem. The TreeView uses a TextBox control as a default editor.

The DisplayValue property represents the value which will be displayed when the item is shown. The Value property represents the logical value which will be edited.  The most important property which we need to set is the EditTemplate. It specifies the actual DataTemplate of the custom editor control. Here is the ComboBoxTemplate which we use as an EditTemplate in our TreeViewItem.

 <DataTemplate x:Name="ComboBoxTemplate">
      <ComboBox SelectedIndex="0">
           <ComboBoxItem Content="Green Tea"/>
           <ComboBoxItem Content="Caffe Espresso"/>
           <ComboBoxItem Content="Caffe Latte"/>
           <ComboBoxItem Content="White Chocolate Mocha"/>
           <ComboBoxItem Content="Caffe Americano"/>
           <ComboBoxItem Content="Cappuccino"/>
           <ComboBoxItem Content="Espresso Truffle"/>            
      </ComboBox>
</DataTemplate>


Finally, you need to update the editor’s value when the edit operation begins and we need to save the edited value when the edit operation ends. We will do this step in the code behind.

Subscribe to the ItemBeginEdit and ItemEndEdit events.
 

 this.TreeView.ItemBeginEdit += new VIBlend.Silverlight.Controls.TreeView.ItemStateChangedHandler(TreeView_ItemBeginEdit);

 this.TreeView.ItemEndEdit += new VIBlend.Silverlight.Controls.TreeView.ItemStateChangedHandler(TreeView_ItemEndEdit);


Set the editor’s value when it is opened. This will allow us to show the item in the combobox which corresponds to the edited TreeViewItem’s value.

void TreeView_ItemBeginEdit(object sender, TreeViewEventArgs args)
{
     if (args.Item.EditTemplate == this.ComboBoxTemplate)
     {
          ComboBox comboBox = this.ComboBoxTemplate.LoadContent() as ComboBox;
          int index = 0;
          foreach (ComboBoxItem item in comboBox.Items)
          {
                    if (item.Content.Equals(args.Item.Value))
                    {
                        ComboBox editor = this.TreeView.ActiveEditor as ComboBox;
                        editor.SelectedIndex = index;
                        break;
                    }

                    index++;
          }
     }
}

 

Save the editor’s value when the edit operation has finished. In the sample code we update the Value and DisplayValue properties.
 

void TreeView_ItemEndEdit(object sender, TreeViewEventArgs args)
{
            if (args.Item == null)
                return;


            if (args.Item.EditTemplate == this.ComboBoxTemplate)
            {
                ComboBox editor = this.TreeView.ActiveEditor as ComboBox;
                ComboBoxItem item = editor.Items[editor.SelectedIndex] as ComboBoxItem;
                args.Item.Value = item.Content;
                args.Item.DisplayValue = "Product - " + args.Item.Value;
            }
 }


The full demo source code is included in the installation of VIBlend Silverlight controls. You can also see the online demo in action as part of  the Live demo of VIBlend Silverlight Controls.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Silverlight | TreeView

Cross-platform OLAP with VIBlend Silverlight Pivot Grid

by viblend 27. November 2009 07:50

In a typical data grid, the data is flat and consists of many rows and columns. The data may contain cells with same values and working with the raw data may not be the best way to spot patterns and analyze trends. Many data grid controls provide rows grouping functionality which allows you to group multiple rows by columns where the corresponding grid cells have the same value.
Pivot tables go one step further and enable powerful data analysis. A Pivot table consists of rows, columns and data (value/fact) fields.
VIBlend DataGrid for Silverlight features a built-in data aggregation engine which is capable of turning any tabular data source into a wide variety of cross tab views. This is similar to the Pivot tables functionality in Excel. Creating a Pivot table with VIBlend DataGrid for Silverlight is very easy. In fact, the data binding to the data source is no different than data binding any other control to a collection. Assume that you have a table with five columns: Country, Region, City, ShipperCompany and ExtendedPrice. You need to choose the columns from the data source and add them to the BoundFields collection:

  CSharp:


pivotGrid1.BoundFields.Add(new BoundField("Country", "Country"));
pivotGrid1.BoundFields.Add(new BoundField("Region", "Region"));
pivotGrid1.BoundFields.Add(new BoundField("City", "City"));
pivotGrid1.BoundFields.Add(new BoundField(
"Shipper Company ", "ShipperCompany"));
pivotGrid1.BoundFields.Add(new BoundField(
"ExtendedPrice", "ExtendedPrice"));


Using this code, once you data bind to the data source, the grid will display all table rows and the five columns: Country, Region, City, Carrier, Extended Price.
However, let’s look at a scenario where we want to show count of sales, amount of sales, and average sale amount grouped by Country, by Region and by City, and do that for each Shipper Company.
This requires only a few extra lines of code:

1. Assign the Country, Region and City fields to form the Rows hierarchy:

CSharp:

pivotGrid1.BoundPivotRows.Add(new BoundField("Country", "Country"));
pivotGrid1.BoundPivotRows.Add(new BoundField("Region", "Region"));
pivotGrid1.BoundPivotRows.Add(new BoundField("City", "City"));


2. Assign the ShipperCompany field to form the Columns hierarchy:

CSharp:

pivotGrid1.BoundPivotColumns.Add(new BoundField(
"Shipper Company", "ShipperCompany"));


3. Assign the ExtendedPrice field to form the facts/values for count of sales, sales amount, and average sale amount:

CSharp:

pivotGrid1.BoundPivotValues.Add(new BoundValueField("Count of Sales", "ExtendedPrice", PivotFieldFunction.Count));
pivotGrid1.BoundPivotValues.Add(new BoundValueField("Amount of Sales", "ExtendedPrice", PivotFieldFunction.Sum));
pivotGrid1.BoundPivotValues.Add(new BoundValueField("Avg Sale Amount", "ExtendedPrice", PivotFieldFunction.Average));


4. Specify if the value/fact columns appear attached to the rows or to the columns:

CSharp:

pivotGrid1.PivotValuesOnRows = false;


During the data binding process, the OLAP engine in VIBlend DataGrid for Silverlight will parse the table content, build the rows and columns hierarchies, and compute the pivot table cell values. The result will be the following pivot table view:


Silverlight Pivot Table



You can learn more and see a Live demo at: http://www.viblend.com

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

olap | pivot | Silverlight | pivot grid | olap grid

VIBlend Silverlight Controls - Released

by viblend 10. November 2009 13:59
We are proud to announce the official release of VIBlend Controls for Silverlight - professional suite of easy to use and feature complete .NET user interface controls for Microsoft Silverlight. VIBlend Silverlight Controls allow you to develop cross-platform rich internet applications (RIA) for a wide range of business scenarios.
VIBlend Silverlight Controls is the first toolkit to introduce a fully functional OLAP DataGrid control for Silverlight. VIBlend DataGrid for Silverlight brings together the features of traditional data grid controls, hierarchical grids and Excel-like pivot tables, and delivers consistent and powerful end-to-end functionality.

VIBlend Silverlight Controls is available for purchase online at http://www.viblend.com
A full feature trial is available for download at http://www.viblend.com and partner websites.

About the author

Some text that describes me

Recent comments

None

Copyright © 2009 VIBlend  
ALL RIGHTS RESERVED  
 
Terms of Use | Privacy Policy
WinForms Controls Purchase Online About Us
       
DataGrid Navigation Pane Technical Support Blog
ScrollBar TreeView
ListBox ProgressBar Downloads Register
ComboBox Buttons
TabControl Editors Documentation Client Login

VIBlend Blog is powered by BlogEngine.NET