The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi there,
I am attempting to get the changes made to a GridStyleInfo object (in this case by the controls on a formatting toolbar). What I need to do is detect which property was changed - bold, font name, background colour, etc - and apply that to the existing style. It works to a certain extent using GridStyleInfo.ModifyStyle and passing in StyleModifyType.Changes - however it doesn''t seem to go below the first level of style properties. For example, if I change only font bold, then the entire Font property is copied as a change.
Does anyone know of a way to copy only those properties that have changed - down to the level of sub properties?
Cheers,
TERRY ROSSOW
ADAdministrator Syncfusion Team May 8, 2006 12:34 PM UTC
Certainly .NET objects/properties are immutable, meaning that in order to change them, you actually have to create a new object. Objects that have readonly properties are prime candidates for being immutable as they only contain get''s and no set''s. Fonts are such properties. That is why, when you change the boldness on a grid font, a new font object is created.
Have you taken a look at the QuickStart\Gridpad sample to see how it handles these tasks? It has a text formatting toolbar that allows you to set boldness, etc. on a font.