Example #1
0
        /// <summary>
        /// Handles the Identifier changed event.
        /// </summary>
        /// <param name="d">Identifier Label whose Identifier is changed.</param>
        /// <param name="e">Instance of <see cref="System.Windows.DependencyPropertyChangedEventArgs"/> containing the data.</param>
        private static void OnIdentifierChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            if (e.OldValue != e.NewValue)
            {
                IdentifierLabel identifierLabel = d as IdentifierLabel;
                if (identifierLabel != null || !typeof(IdentifierLabel).IsInstanceOfType(identifierLabel))
                {
                    identifierLabel.UpdateDisplayValue();
                }

                IdentifierLabelAutomationPeer peer;
#if SILVERLIGHT
                peer = FrameworkElementAutomationPeer.FromElement(identifierLabel) as IdentifierLabelAutomationPeer;
#else
                peer = UIElementAutomationPeer.FromElement(identifierLabel) as IdentifierLabelAutomationPeer;
#endif

                if (peer != null)
                {
                    peer.RaiseValueChangedEvent(e.OldValue.ToString(), e.NewValue.ToString());
                }
            }
        }
 /// <summary>
 /// Creates a new instance of Identifier label automation peer.
 /// </summary>
 /// <param name="control">Identifier label control.</param>
 public IdentifierLabelAutomationPeer(IdentifierLabel control)
     : base(control)
 {
 }
Example #3
0
 /// <summary>
 /// Creates a new instance of Identifier label automation peer.
 /// </summary>
 /// <param name="control">Identifier label control.</param>
 public IdentifierLabelAutomationPeer(IdentifierLabel control)
     : base(control)
 {
 }