hello
I 'm trying to handle resized column event when the user
resize it to save its new width on setting file
how can i do that I didn't find any event in XamDataGrid that respond to resize event
To the best of my knowledge, there is no event for resizing of field, but you can use the LayoutUpdated and them SaveCustomizations method.
You can, however, request this specific event as a feature on the link below:
http://devcenter.infragistics.com/Protected/RequestFeature.aspx
Regards,
Alex.
thanks alot but LayoutUpdated Event is called repeatedly many times even if the mouse over the grid
this event will be fired the sender and event args are null so I don;t want to save the column width
every mouse movements
Yes, this is a drawback, that is why I encourage you to submit this as a feature.
Another way around this is probably use SizeChanged event of the ValueEditor and handle the event just in cases that the field is being resized.
EventManager.RegisterClassHandler(typeof(ValueEditor), ValueEditor.SizeChangedEvent, new SizeChangedEventHandler(e_SizeChanged));
thanks alot that's better
but could you clear the code more please
I think your code will help me both in size changed problem and in other problem : that how can I respond to GotFocus Event for XamNumericEditor that I put As Style for XamDataGridField so I can register the event
Am I right ? [ sorry may be I opened another discussion problem]
thanks I found answer for my second problem
it is so easy :
To match event handler to Style by Code or By xaml
just use Event Setter
okay I 'm waiting for you code ?
thanks again Alex
Yes, in style you should use <EventSetter .. Handler= ... Event=.../>
Regarding the EventManager, it basically is the same thing as the EventSetter but without the style. If you want, you can create a style and hook up the SizeChanged event to that style. The other option is by EventManager:
The first parameter is what type you want to register an event to.
The second parameter is the actual event (as in the EventSetter)
Thrid parameter is the handler.
With EventSetter, this code would look like:
<Style TargetType="{x:Type igEditors: XamNumericEditor}">
<EventSetter Event="SizeChanged" Handler="e_SizeChanged"/>
</Style>
Let me know if you have questions on this.