Kayıtlar

2012 tarihine ait yayınlar gösteriliyor

Silverlight GridSplitter Kontrol

This article is compatible with the latest version of Silverlight. Introduction To use the  GridSplitter  you should be familiar with the  Grid  control. It is a control that allows the user to resize dynamically the width or height of the  Grid  cells. See also: Grid Article Overview The following example demonstrates how to use the  GridSplitter : We want to have two cells whose width can be redistributed. The blue line can be moved left or right when clicking on it, holding the mouse button and dragging. Thus the neighbor cells can be resized. The XAML code: < UserControl      xmlns : basics ="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"        x : Class ="GridSplitter2.Page"      xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation"      xmlns : x ="http://schemas.microsoft.com/winfx/2006/xaml"...

Styling Microsoft’s WPF datagrid

Resim
Microsoft’s  WPF datagrid  has a lot of properties and styles you can tweak to get it looking right (if you are a designer). Below, find my cheat sheet to styling the grid.   It is not 100% comprehensive but it gets you far and has a few very useful tips & gotchas.  At the highest level in the DataGrid , you can change the look & feel by setting some of these: Property Type Values Default AlternatingRowBackground Brush Any Brush Null Background Brush Any Brush Theme default ColumnHeaderHeight Double 0 to any positive double NaN ColumnHeaderStyle Style Any Style Null ColumnWidth DataGridLength 0 to any positive double, Auto, *, SizeToCells, SizeToHeader SizeToHeader HeadersVisibility DataGridHeadersVisibility All, Row, Column, None All MaxColumnWidth Double 0 to any positive double Positive Infinity MaxRowHeight Double 0 to any positive double Positive Infinity MinColumnWidth Double 0 to any positive double 20 MinRowHeight Double 0 ...