> Thanks for the tip, Sergey.
>
[quoted text clipped - 20 lines]
> > Try getting IComponentChangeService from component's site via GetService()
> > and then calling ComponentChanging on it. HTH.
Hi Tom,
Yes, you are right.
Normally, we should fire OnComponentChanging before the component is
actually changed, and gives the designer a chance to abort the change or
perform any pre-change processing. And after making the changes, you may
call OnComponentChanged method.
.Net BCL designer classes also obey this rule. See the code of
Localize(IDesignTimeResourceWriter resourceWriter) method in
System.Web.UI.Design.ControlDesigner:
public void Localize(IDesignTimeResourceWriter resourceWriter)
{
string text1;
this.OnComponentChanging(base.Component, new
ComponentChangingEventArgs(base.Component, null));
string text2 = ControlLocalizer.LocalizeControl((Control)
base.Component, resourceWriter, out text1);
if (!string.IsNullOrEmpty(text2))
{
this.SetTagAttribute("meta:resourcekey", text2, true);
}
if (!string.IsNullOrEmpty(text1))
{
this._localizedInnerContent = text1;
}
this.OnComponentChanged(base.Component, new
ComponentChangedEventArgs(base.Component, null, null, null));
}
Anyway, if you need further help, please feel free to post, thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.