Spread WPF Documentation
ShrinkToFit Property (StyleInfo)
Example 


Gets or sets whether to shrink to fit.
Syntax
'Declaration
 
<System.ComponentModel.DefaultValueAttribute()>
Public Property ShrinkToFit As System.Boolean
'Usage
 
Dim instance As StyleInfo
Dim value As System.Boolean
 
instance.ShrinkToFit = value
 
value = instance.ShrinkToFit
[System.ComponentModel.DefaultValue()]
public System.bool ShrinkToFit {get; set;}

Property Value

true if the content supports shrink to fit; otherwise, false. The default value is false.
Example
This example sets the ShrinkToFit property.
GrapeCity.Windows.SpreadSheet.Data.StyleInfo style = new GrapeCity.Windows.SpreadSheet.Data.StyleInfo();
style.ShrinkToFit = true;
style.Background = new SolidColorBrush(Colors.Bisque);
style.Name = "style1";
gcSpreadSheet1.Sheets[0].NamedStyles.Add(style);
gcSpreadSheet1.Sheets[0].Rows[1].StyleName = "style1";
//style.ResetShrinkToFit();
gcSpreadSheet1.Invalidate();
Dim style As New GrapeCity.Windows.SpreadSheet.Data.StyleInfo()
style.ShrinkToFit = True
style.Background = New SolidColorBrush(Colors.Bisque)
style.Name = "style1"
GcSpreadSheet1.Sheets(0).NamedStyles.Add(style)
GcSpreadSheet1.Sheets(0).Rows(1).StyleName = "style1"
'style.ResetShrinkToFit()
GcSpreadSheet1.Invalidate()
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)

See Also

Reference

StyleInfo Class
StyleInfo Members

 

 


Copyright © GrapeCity, inc. All rights reserved.