コード例 #1
0
ファイル: Label.cs プロジェクト: incoplex/silverlight-toolkit
        private static void OnIsValidPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Label label = d as Label;

            if (label != null && !label.AreHandlersSuspended())
            {
                label.SetValueNoCallback(Label.IsValidProperty, e.OldValue);
                throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, resources.UnderlyingPropertyIsReadOnly, "IsValid"));
            }
        }
コード例 #2
0
        private static void OnIsValidPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Label label = d as Label;

            if (label != null && !label.AreHandlersSuspended())
            {
                label.SetValueNoCallback(Label.IsValidProperty, e.OldValue);
                throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "{0} cannot be set because the underlying property is read only.", "IsValid"));
            }
        }