Esempio n. 1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.passwordBox = ((ZdfFlatUI.ZPasswordBox)(target));
                return;

            case 2:
                this.passwordBox1 = ((ZdfFlatUI.ZPasswordBox)(target));
                return;

            case 3:
                this.passwordBox2 = ((ZdfFlatUI.ZPasswordBox)(target));
                return;

            case 4:
                this.passwordBox3 = ((ZdfFlatUI.ZPasswordBox)(target));
                return;

            case 5:
                this.AutoCompleteBox = ((ZdfFlatUI.AutoCompleteBox)(target));
                return;

            case 6:
                this.btnStartValidate = ((ZdfFlatUI.FlatToggleButton)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 2
0
        private static void IsCanSeePasswordChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ZPasswordBox passowrdBox = d as ZPasswordBox;

            if (passowrdBox != null && passowrdBox.PART_SeePassword != null)
            {
                passowrdBox.PART_SeePassword.Visibility = (bool)e.NewValue ? Visibility.Visible : Visibility.Collapsed;
            }
        }
Esempio n. 3
0
        private static void ShowPasswordChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ZPasswordBox passwordBox = d as ZPasswordBox;

            if (passwordBox != null)
            {
                passwordBox.SelectionStart = passwordBox.Text.Length + 1;
            }
        }