CodeCarvings Piczard V1.2 Help
InlinePictureTrimmer - Server-side events
Send Feedback
Piczard Fundamentals - Web > PictureTrimmer > InlinePictureTrimmer > InlinePictureTrimmer - Server-side events

Glossary Item Box

The ValueChanged event handler

Please see the Example A.312 - "Web - PictureTrimmer / InlinePictureTrimmer - Server side events"

The ValueChanged event allows the application to intercept changes to the Value property (made by the end-user on the client-side)

This server-side event is raised only after a page postback.
Since the InlinePictureTrimmer control does not automatically raise page postbacks, it is a task of the application to cause a page postback.

On the client-side you can use the "UserStateChanged" event handler to detect changes to the state of the control.
Please see InlinePictureTrimmer - Client-side events

The event argument PictureTrimmerValueChangedEventArgs (passed as a parameter to the PictureTrimmerValueChangedEventHandler delegate) provides access to:

In this way you can understand what has been changed by the user.


Copy Code
protected void InlinePictureTrimmer1_ValueChanged(object sender, PictureTrimmerValueChangedEventArgs e)
if (e.NewValue.ImageSelection.Transformation.ResizeFactor != e.PreviousValue.ImageSelection.Transformation.ResizeFactor)
"Reisze factor has been changed");
if (e.NewValue.ImageSelection.Crop.Rectangle.Value.Width != e.PreviousValue.ImageSelection.Crop.Rectangle.Value.Width)
"Width of the crop rectangle has been changed");
if (e.NewValue.ImageAdjustments.Brightness != e.PreviousValue.ImageAdjustments.Brightness)
"Brightness has been changed");

The ValueChanged event is raised only if the value (PictureTrimmerValue) of the PictureTrimmer control has been changed.
This event is not raised if the users changes one of the properties of the UI parameters (e.g. the ZoomFactor).

If you need to intercept every change to the state of the control (PictureTrimmerUserState - for example PictureScrollH) then you have to use the "UserStateChanged" client-side event handler.
Please see: InlinePictureTrimmer - Client-side events


©2013 Sergio Turolla. All Rights Reserved.