public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/VideoZoneV2;component/Registration.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.textBlock1 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock1"))); this.textBlock2 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock2"))); this.textBlock4 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock4"))); this.txtUser = ((System.Windows.Controls.TextBox)(this.FindName("txtUser"))); this.txtEmail = ((System.Windows.Controls.TextBox)(this.FindName("txtEmail"))); this.vldSum = ((System.Windows.Controls.ValidationSummary)(this.FindName("vldSum"))); this.textBlock4_Copy = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock4_Copy"))); this.textBlock4_Copy1 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock4_Copy1"))); this.textBlock4_Copy2 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock4_Copy2"))); this.txtAddress = ((System.Windows.Controls.TextBox)(this.FindName("txtAddress"))); this.cbPrefix = ((System.Windows.Controls.ComboBox)(this.FindName("cbPrefix"))); this.txtPN = ((System.Windows.Controls.TextBox)(this.FindName("txtPN"))); this.textBlock4_Copy3 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock4_Copy3"))); this.cbSQ = ((System.Windows.Controls.ComboBox)(this.FindName("cbSQ"))); this.textBlock4_Copy4 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock4_Copy4"))); this.txtAnswer = ((System.Windows.Controls.TextBox)(this.FindName("txtAnswer"))); this.cbDD = ((System.Windows.Controls.ComboBox)(this.FindName("cbDD"))); this.cbMM = ((System.Windows.Controls.ComboBox)(this.FindName("cbMM"))); this.cbYYYY = ((System.Windows.Controls.ComboBox)(this.FindName("cbYYYY"))); this.txtPass = ((System.Windows.Controls.PasswordBox)(this.FindName("txtPass"))); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/VideoZoneV2;component/MainPage.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.txtEmail = ((System.Windows.Controls.TextBox)(this.FindName("txtEmail"))); this.txtPass = ((System.Windows.Controls.PasswordBox)(this.FindName("txtPass"))); this.vldSum = ((System.Windows.Controls.ValidationSummary)(this.FindName("vldSum"))); this.SignInBtn = ((System.Windows.Controls.Image)(this.FindName("SignInBtn"))); this.tbSignUp = ((System.Windows.Controls.TextBlock)(this.FindName("tbSignUp"))); this.Forgot = ((System.Windows.Controls.TextBlock)(this.FindName("Forgot"))); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/VideoZoneV2;component/UpdateVideo.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.txtVideoName = ((System.Windows.Controls.TextBox)(this.FindName("txtVideoName"))); this.lbl1 = ((System.Windows.Controls.Label)(this.FindName("lbl1"))); this.ShareTxt = ((System.Windows.Controls.TextBox)(this.FindName("ShareTxt"))); this.EveryoneCb = ((System.Windows.Controls.CheckBox)(this.FindName("EveryoneCb"))); this.vldSum = ((System.Windows.Controls.ValidationSummary)(this.FindName("vldSum"))); this.cbCategory = ((System.Windows.Controls.ComboBox)(this.FindName("cbCategory"))); this.subject = ((System.Windows.Controls.Image)(this.FindName("subject"))); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/VideoZoneV2;component/Message.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.txtSentTo = ((System.Windows.Controls.TextBox)(this.FindName("txtSentTo"))); this.txtSubject = ((System.Windows.Controls.TextBox)(this.FindName("txtSubject"))); this.txtContent = ((System.Windows.Controls.TextBox)(this.FindName("txtContent"))); this.vldSum = ((System.Windows.Controls.ValidationSummary)(this.FindName("vldSum"))); this.subject = ((System.Windows.Controls.Image)(this.FindName("subject"))); this.Send = ((System.Windows.Controls.Image)(this.FindName("Send"))); this.Back = ((System.Windows.Controls.Image)(this.FindName("Back"))); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/VideoZoneV2;component/ResetPassword.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.txtEmail = ((System.Windows.Controls.TextBox)(this.FindName("txtEmail"))); this.lblSq = ((System.Windows.Controls.Label)(this.FindName("lblSq"))); this.txtAns = ((System.Windows.Controls.TextBox)(this.FindName("txtAns"))); this.vldSum = ((System.Windows.Controls.ValidationSummary)(this.FindName("vldSum"))); this.subject = ((System.Windows.Controls.Image)(this.FindName("subject"))); this.newPass = ((System.Windows.Controls.TextBox)(this.FindName("newPass"))); this.pls = ((System.Windows.Controls.TextBlock)(this.FindName("pls"))); this.nxt = ((System.Windows.Controls.Image)(this.FindName("nxt"))); this.Back = ((System.Windows.Controls.Image)(this.FindName("Back"))); this.Next = ((System.Windows.Controls.Image)(this.FindName("Next"))); this.reset = ((System.Windows.Controls.Image)(this.FindName("reset"))); }
/// <summary> /// When one of the input controls has its ShowErrorsInSummary property changed, we have to go through all the ValidationSummaries on the page and update them /// </summary> /// <param name="parent">The parent ValidationSummary</param> private static void UpdateDisplayedErrorsOnAllValidationSummaries(DependencyObject parent) { if (parent == null) { return; } ValidationSummary vs = parent as ValidationSummary; if (vs != null) { vs.UpdateDisplayedErrors(); return; } for (int i = 0; i < VisualTreeHelper.GetChildrenCount(parent); i++) { DependencyObject child = VisualTreeHelper.GetChild(parent, i); UpdateDisplayedErrorsOnAllValidationSummaries(child); } }
/// <summary> /// Initializes a new instance of the <see cref="T:System.Windows.Automation.Peers.ValidationSummaryAutomationPeer" /> class. /// </summary> /// <param name="owner"> /// The <see cref="T:System.Windows.Controls.ValidationSummary" /> that is associated with this <see cref="T:System.Windows.Automation.Peers.ValidationSummaryAutomationPeer" />. /// </param> public ValidationSummaryAutomationPeer(ValidationSummary owner) : base(owner) { }
public override void OnApplyTemplate() { base.OnApplyTemplate(); if (this._contentPresenter != null) { this._contentPresenter.Content = null; } this._contentPresenter = GetTemplateChild(DATAFORM_elementContentPresenter) as ContentPresenter; if (this._firstItemButton != null) { this._firstItemButton.Click -= new RoutedEventHandler(this.OnMoveToFirstItemButtonClick); } this._firstItemButton = GetTemplateChild(DATAFORM_elementFirstItemButton) as ButtonBase; if (this._firstItemButton != null) { this._firstItemButton.Click += new RoutedEventHandler(this.OnMoveToFirstItemButtonClick); } if (this._validationSummary != null) { this._validationSummary.Errors.CollectionChanged -= new NotifyCollectionChangedEventHandler(this.OnValidationSummaryErrorsCollectionChanged); } this._validationSummary = GetTemplateChild(DATAFORM_elementValidationSummary) as ValidationSummary; if (this._validationSummary != null) { this._validationSummary.Errors.CollectionChanged += new NotifyCollectionChangedEventHandler(this.OnValidationSummaryErrorsCollectionChanged); this._validationSummary.SetStyleWithType(this.ValidationSummaryStyle); if (DesignerProperties.IsInDesignTool) { Debug.Assert(this._validationSummary.Errors != null, "The Errors collection in the ValidationSummary should never be null."); // Do not add the default design time errors when in design mode. this._validationSummary.Errors.Clear(); } } if (this._previousItemButton != null) { this._previousItemButton.Click -= new RoutedEventHandler(this.OnMoveToPreviousItemButtonClick); } this._previousItemButton = GetTemplateChild(DATAFORM_elementPreviousItemButton) as ButtonBase; if (this._previousItemButton != null) { this._previousItemButton.Click += new RoutedEventHandler(this.OnMoveToPreviousItemButtonClick); } if (this._nextItemButton != null) { this._nextItemButton.Click -= new RoutedEventHandler(this.OnMoveToNextItemButtonClick); } this._nextItemButton = GetTemplateChild(DATAFORM_elementNextItemButton) as ButtonBase; if (this._nextItemButton != null) { this._nextItemButton.Click += new RoutedEventHandler(this.OnMoveToNextItemButtonClick); } if (this._lastItemButton != null) { this._lastItemButton.Click -= new RoutedEventHandler(this.OnMoveToLastItemButtonClick); } this._lastItemButton = GetTemplateChild(DATAFORM_elementLastItemButton) as ButtonBase; if (this._lastItemButton != null) { this._lastItemButton.Click += new RoutedEventHandler(this.OnMoveToLastItemButtonClick); } this._buttonSeparator = GetTemplateChild(DATAFORM_elementButtonSeparator) as UIElement; if (this._buttonSeparator != null) { this.SetButtonSeparatorVisibility(); } if (this._newItemButton != null) { this._newItemButton.Click -= new RoutedEventHandler(this.OnNewItemButtonClick); } this._newItemButton = GetTemplateChild(DATAFORM_elementNewItemButton) as ButtonBase; if (this._newItemButton != null) { this._newItemButton.Click += new RoutedEventHandler(this.OnNewItemButtonClick); this.SetNewItemButtonVisibility(); } if (this._deleteItemButton != null) { this._deleteItemButton.Click -= new RoutedEventHandler(this.OnDeleteItemButtonClick); } this._deleteItemButton = GetTemplateChild(DATAFORM_elementDeleteItemButton) as ButtonBase; if (this._deleteItemButton != null) { this._deleteItemButton.Click += new RoutedEventHandler(this.OnDeleteItemButtonClick); this.SetDeleteItemButtonVisibility(); } if (this._editButton != null) { this._editButton.Click -= new RoutedEventHandler(this.OnBeginEditButtonClick); } this._editButton = GetTemplateChild(DATAFORM_elementEditButton) as ButtonBase; if (this._editButton != null) { this._editButton.Click += new RoutedEventHandler(this.OnBeginEditButtonClick); this.SetEditButtonVisibility(); } if (this._commitButton != null) { this._commitButton.Click -= new RoutedEventHandler(this.OnCommitEditButtonClick); } this._commitButton = GetTemplateChild(DATAFORM_elementCommitButton) as ButtonBase; if (this._commitButton != null) { this._commitButton.Click += new RoutedEventHandler(this.OnCommitEditButtonClick); if (this.CommitButtonContent != null) { this._commitButton.Content = this.CommitButtonContent; } if (this.CommitButtonStyle != null) { this._commitButton.SetBinding(ButtonBase.StyleProperty, new Binding("CommitButtonStyle") { Source = this }); } this.SetCommitButtonVisibility(); } if (this._cancelButton != null) { this._cancelButton.Click -= new RoutedEventHandler(this.OnCancelEditButtonClick); } this._cancelButton = GetTemplateChild(DATAFORM_elementCancelButton) as ButtonBase; if (this._cancelButton != null) { this._cancelButton.Click += new RoutedEventHandler(this.OnCancelEditButtonClick); if (this.CancelButtonContent != null) { this._cancelButton.Content = this.CancelButtonContent; } if (this.CancelButtonStyle != null) { this._cancelButton.SetBinding(ButtonBase.StyleProperty, new Binding("CancelButtonStyle") { Source = this }); } this.SetCancelButtonVisibility(); } this.UpdateCurrentItem(); this.GenerateUI(); }
/// <summary> /// Builds the visual tree for the column header when a new template is applied. /// </summary> public override void OnApplyTemplate() { // The template has changed, so we need to refresh the visuals this._measured = false; if (this._columnHeadersPresenter != null) { // If we're applying a new template, we want to remove the old column headers first this._columnHeadersPresenter.Children.Clear(); } _columnHeadersPresenter = GetTemplateChild(DATAGRID_elementColumnHeadersPresenterName) as DataGridColumnHeadersPresenter; if (_columnHeadersPresenter != null) { if (this.ColumnsInternal.FillerColumn != null) { this.ColumnsInternal.FillerColumn.IsRepresented = false; } _columnHeadersPresenter.OwningGrid = this; // Columns were added before before our Template was applied, add the ColumnHeaders now foreach (DataGridColumn column in this.ColumnsItemsInternal) { InsertDisplayedColumnHeader(column); } } if (this._rowsPresenter != null) { // If we're applying a new template, we want to remove the old rows first this.UnloadElements(false /*recycle*/); } _rowsPresenter = GetTemplateChild(DATAGRID_elementRowsPresenterName) as DataGridRowsPresenter; if (_rowsPresenter != null) { _rowsPresenter.OwningGrid = this; InvalidateRowHeightEstimate(); UpdateRowDetailsHeightEstimate(); } _frozenColumnScrollBarSpacer = GetTemplateChild(DATAGRID_elementFrozenColumnScrollBarSpacerName) as FrameworkElement; if (_hScrollBar != null) { _hScrollBar.Scroll -= new ScrollEventHandler(HorizontalScrollBar_Scroll); } _hScrollBar = GetTemplateChild(DATAGRID_elementHorizontalScrollbarName) as ScrollBar; if (_hScrollBar != null) { _hScrollBar.IsTabStop = false; _hScrollBar.Maximum = 0.0; _hScrollBar.Orientation = Orientation.Horizontal; _hScrollBar.Visibility = Visibility.Collapsed; _hScrollBar.Scroll += new ScrollEventHandler(HorizontalScrollBar_Scroll); } if (_vScrollBar != null) { _vScrollBar.Scroll -= new ScrollEventHandler(VerticalScrollBar_Scroll); } _vScrollBar = GetTemplateChild(DATAGRID_elementVerticalScrollbarName) as ScrollBar; if (_vScrollBar != null) { _vScrollBar.IsTabStop = false; _vScrollBar.Maximum = 0.0; _vScrollBar.Orientation = Orientation.Vertical; _vScrollBar.Visibility = Visibility.Collapsed; _vScrollBar.Scroll += new ScrollEventHandler(VerticalScrollBar_Scroll); } _topLeftCornerHeader = GetTemplateChild(DATAGRID_elementTopLeftCornerHeaderName) as ContentControl; EnsureTopLeftCornerHeader(); // EnsureTopLeftCornerHeader checks for a null _topLeftCornerHeader; _topRightCornerHeader = GetTemplateChild(DATAGRID_elementTopRightCornerHeaderName) as ContentControl; if (this._validationSummary != null) { this._validationSummary.FocusingInvalidControl -= new EventHandler<FocusingInvalidControlEventArgs>(ValidationSummary_FocusingInvalidControl); this._validationSummary.SelectionChanged -= new EventHandler<SelectionChangedEventArgs>(ValidationSummary_SelectionChanged); } this._validationSummary = GetTemplateChild(DATAGRID_elementValidationSummary) as ValidationSummary; if (this._validationSummary != null) { // The ValidationSummary defaults to using its parent if Target is null, so the only // way to prevent it from automatically picking up errors is to set it to some useless element. if (this._validationSummary.Target == null) { this._validationSummary.Target = new Rectangle(); } this._validationSummary.FocusingInvalidControl += new EventHandler<FocusingInvalidControlEventArgs>(ValidationSummary_FocusingInvalidControl); this._validationSummary.SelectionChanged += new EventHandler<SelectionChangedEventArgs>(ValidationSummary_SelectionChanged); if (DesignerProperties.IsInDesignTool) { Debug.Assert(this._validationSummary.Errors != null); // Do not add the default design time errors when in design mode. this._validationSummary.Errors.Clear(); } } UpdateDisabledVisual(); }