コード例 #1
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Galatee.Silverlight;component/Parametrage/UcTDEM.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.bntCancel  = ((System.Windows.Controls.Button)(this.FindName("bntCancel")));
     this.btnDelete  = ((System.Windows.Controls.Button)(this.FindName("btnDelete")));
     this.headeredContentControl2 = ((System.Windows.Controls.HeaderedContentControl)(this.FindName("headeredContentControl2")));
     this.grid2     = ((System.Windows.Controls.Grid)(this.FindName("grid2")));
     this.btnOk     = ((System.Windows.Controls.Button)(this.FindName("btnOk")));
     this.btnPrint  = ((System.Windows.Controls.Button)(this.FindName("btnPrint")));
     this.dgINIT    = ((System.Windows.Controls.DataGrid)(this.FindName("dgINIT")));
     this.cbo_evnt5 = ((System.Windows.Controls.ComboBox)(this.FindName("cbo_evnt5")));
     this.label2    = ((System.Windows.Controls.Label)(this.FindName("label2")));
     this.cbo_evnt2 = ((System.Windows.Controls.ComboBox)(this.FindName("cbo_evnt2")));
     this.label3    = ((System.Windows.Controls.Label)(this.FindName("label3")));
     this.cbo_evnt4 = ((System.Windows.Controls.ComboBox)(this.FindName("cbo_evnt4")));
     this.label4    = ((System.Windows.Controls.Label)(this.FindName("label4")));
     this.cbo_evnt1 = ((System.Windows.Controls.ComboBox)(this.FindName("cbo_evnt1")));
     this.label5    = ((System.Windows.Controls.Label)(this.FindName("label5")));
     this.cbo_evnt3 = ((System.Windows.Controls.ComboBox)(this.FindName("cbo_evnt3")));
     this.label1    = ((System.Windows.Controls.Label)(this.FindName("label1")));
 }
コード例 #2
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Galatee.Silverlight;component/Parametrage/Parametrage/UcAjouterCasInd.xaml", System.UriKind.Relative));
     this.LayoutRoot              = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.OKButton                = ((System.Windows.Controls.Button)(this.FindName("OKButton")));
     this.txtAmount               = ((System.Windows.Controls.TextBox)(this.FindName("txtAmount")));
     this.txtcentre               = ((System.Windows.Controls.TextBox)(this.FindName("txtcentre")));
     this.txtDefValeusss          = ((System.Windows.Controls.TextBox)(this.FindName("txtDefValeusss")));
     this.btnAddRow               = ((System.Windows.Controls.Button)(this.FindName("btnAddRow")));
     this.btnReset                = ((System.Windows.Controls.Button)(this.FindName("btnReset")));
     this.cbo_input               = ((System.Windows.Controls.ComboBox)(this.FindName("cbo_input")));
     this.cbo_inv_inq_notconf     = ((System.Windows.Controls.ComboBox)(this.FindName("cbo_inv_inq_notconf")));
     this.headeredContentControl4 = ((System.Windows.Controls.HeaderedContentControl)(this.FindName("headeredContentControl4")));
     this.grid4                   = ((System.Windows.Controls.Grid)(this.FindName("grid4")));
     this.label5                  = ((System.Windows.Controls.Label)(this.FindName("label5")));
     this.cbo_consump             = ((System.Windows.Controls.ComboBox)(this.FindName("cbo_consump")));
     this.cbo_meter               = ((System.Windows.Controls.ComboBox)(this.FindName("cbo_meter")));
     this.headeredContentControl5 = ((System.Windows.Controls.HeaderedContentControl)(this.FindName("headeredContentControl5")));
     this.grid5                   = ((System.Windows.Controls.Grid)(this.FindName("grid5")));
     this.label9                  = ((System.Windows.Controls.Label)(this.FindName("label9")));
     this.label10                 = ((System.Windows.Controls.Label)(this.FindName("label10")));
     this.cbo_erasable            = ((System.Windows.Controls.ComboBox)(this.FindName("cbo_erasable")));
     this.label3                  = ((System.Windows.Controls.Label)(this.FindName("label3")));
     this.label1                  = ((System.Windows.Controls.Label)(this.FindName("label1")));
     this.label2                  = ((System.Windows.Controls.Label)(this.FindName("label2")));
     this.label4                  = ((System.Windows.Controls.Label)(this.FindName("label4")));
     this.label6                  = ((System.Windows.Controls.Label)(this.FindName("label6")));
 }
コード例 #3
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Galatee.Silverlight;component/Parametrage/UcDEMCOUT.xaml", System.UriKind.Relative));
     this.LayoutRoot              = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.bntCancel               = ((System.Windows.Controls.Button)(this.FindName("bntCancel")));
     this.btnDelete               = ((System.Windows.Controls.Button)(this.FindName("btnDelete")));
     this.progressBar1            = ((System.Windows.Controls.ProgressBar)(this.FindName("progressBar1")));
     this.headeredContentControl2 = ((System.Windows.Controls.HeaderedContentControl)(this.FindName("headeredContentControl2")));
     this.grid2                   = ((System.Windows.Controls.Grid)(this.FindName("grid2")));
     this.btnOk                   = ((System.Windows.Controls.Button)(this.FindName("btnOk")));
     this.btnPrint                = ((System.Windows.Controls.Button)(this.FindName("btnPrint")));
     this.dtgrdDemCout            = ((System.Windows.Controls.DataGrid)(this.FindName("dtgrdDemCout")));
     this.headeredContentControl1 = ((System.Windows.Controls.HeaderedContentControl)(this.FindName("headeredContentControl1")));
     this.grid1                   = ((System.Windows.Controls.Grid)(this.FindName("grid1")));
     this.label6                  = ((System.Windows.Controls.Label)(this.FindName("label6")));
     this.txtAmount1              = ((System.Windows.Controls.TextBox)(this.FindName("txtAmount1")));
     this.label1                  = ((System.Windows.Controls.Label)(this.FindName("label1")));
     this.txtAmount2              = ((System.Windows.Controls.TextBox)(this.FindName("txtAmount2")));
     this.label2                  = ((System.Windows.Controls.Label)(this.FindName("label2")));
     this.txtAmount4              = ((System.Windows.Controls.TextBox)(this.FindName("txtAmount4")));
     this.label3                  = ((System.Windows.Controls.Label)(this.FindName("label3")));
     this.txtAmount5              = ((System.Windows.Controls.TextBox)(this.FindName("txtAmount5")));
     this.label4                  = ((System.Windows.Controls.Label)(this.FindName("label4")));
     this.txtAmount3              = ((System.Windows.Controls.TextBox)(this.FindName("txtAmount3")));
 }
コード例 #4
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Galatee.Silverlight;component/Parametrage/Parametrage/UcREGROU.xaml", System.UriKind.Relative));
     this.LayoutRoot              = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.bntCancel               = ((System.Windows.Controls.Button)(this.FindName("bntCancel")));
     this.btnDelete               = ((System.Windows.Controls.Button)(this.FindName("btnDelete")));
     this.progressBar1            = ((System.Windows.Controls.ProgressBar)(this.FindName("progressBar1")));
     this.label3                  = ((System.Windows.Controls.Label)(this.FindName("label3")));
     this.label1                  = ((System.Windows.Controls.Label)(this.FindName("label1")));
     this.txtCode                 = ((System.Windows.Controls.TextBox)(this.FindName("txtCode")));
     this.label2                  = ((System.Windows.Controls.Label)(this.FindName("label2")));
     this.txtcentre               = ((System.Windows.Controls.TextBox)(this.FindName("txtcentre")));
     this.label5                  = ((System.Windows.Controls.Label)(this.FindName("label5")));
     this.txtLibelle              = ((System.Windows.Controls.TextBox)(this.FindName("txtLibelle")));
     this.headeredContentControl1 = ((System.Windows.Controls.HeaderedContentControl)(this.FindName("headeredContentControl1")));
     this.grid1     = ((System.Windows.Controls.Grid)(this.FindName("grid1")));
     this.btnAddRow = ((System.Windows.Controls.Button)(this.FindName("btnAddRow")));
     this.headeredContentControl2 = ((System.Windows.Controls.HeaderedContentControl)(this.FindName("headeredContentControl2")));
     this.grid2           = ((System.Windows.Controls.Grid)(this.FindName("grid2")));
     this.btnOk           = ((System.Windows.Controls.Button)(this.FindName("btnOk")));
     this.btnPrint        = ((System.Windows.Controls.Button)(this.FindName("btnPrint")));
     this.dgINIT          = ((System.Windows.Controls.DataGrid)(this.FindName("dgINIT")));
     this.cbo_refproducts = ((System.Windows.Controls.ComboBox)(this.FindName("cbo_refproducts")));
     this.btnReset        = ((System.Windows.Controls.Button)(this.FindName("btnReset")));
 }
コード例 #5
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Galatee.Silverlight;component/Parametrage/FrmGeneric.xaml", System.UriKind.Relative));
     this.LayoutRoot              = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.bntCancel               = ((System.Windows.Controls.Button)(this.FindName("bntCancel")));
     this.lvwResultat             = ((System.Windows.Controls.DataGrid)(this.FindName("lvwResultat")));
     this.btnDelete               = ((System.Windows.Controls.Button)(this.FindName("btnDelete")));
     this.progressBar1            = ((System.Windows.Controls.ProgressBar)(this.FindName("progressBar1")));
     this.label3                  = ((System.Windows.Controls.Label)(this.FindName("label3")));
     this.Txt_NumeroTable         = ((System.Windows.Controls.TextBox)(this.FindName("Txt_NumeroTable")));
     this.label1                  = ((System.Windows.Controls.Label)(this.FindName("label1")));
     this.txtcode                 = ((System.Windows.Controls.TextBox)(this.FindName("txtcode")));
     this.label2                  = ((System.Windows.Controls.Label)(this.FindName("label2")));
     this.txtcentre               = ((System.Windows.Controls.TextBox)(this.FindName("txtcentre")));
     this.label5                  = ((System.Windows.Controls.Label)(this.FindName("label5")));
     this.txtref                  = ((System.Windows.Controls.TextBox)(this.FindName("txtref")));
     this.headeredContentControl1 = ((System.Windows.Controls.HeaderedContentControl)(this.FindName("headeredContentControl1")));
     this.grid1     = ((System.Windows.Controls.Grid)(this.FindName("grid1")));
     this.btnAddRow = ((System.Windows.Controls.Button)(this.FindName("btnAddRow")));
     this.headeredContentControl2 = ((System.Windows.Controls.HeaderedContentControl)(this.FindName("headeredContentControl2")));
     this.grid2    = ((System.Windows.Controls.Grid)(this.FindName("grid2")));
     this.button1  = ((System.Windows.Controls.Button)(this.FindName("button1")));
     this.btnPrint = ((System.Windows.Controls.Button)(this.FindName("btnPrint")));
     this.btnReset = ((System.Windows.Controls.Button)(this.FindName("btnReset")));
 }
コード例 #6
0
		public void ToString ()
		{
			HeaderedContentControl c = new HeaderedContentControl ();
			c.Header = "1";
			c.Content = "2";
			Assert.AreEqual (c.ToString (), "System.Windows.Controls.HeaderedContentControl Header:1 Content:2");
		}
コード例 #7
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Galatee.Silverlight;component/Accueil/FrmFollowUpPaymentReceipt.xaml", System.UriKind.Relative));
     this.LayoutRoot              = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.bntCancel               = ((System.Windows.Controls.Button)(this.FindName("bntCancel")));
     this.progressBar1            = ((System.Windows.Controls.ProgressBar)(this.FindName("progressBar1")));
     this.headeredContentControl2 = ((System.Windows.Controls.HeaderedContentControl)(this.FindName("headeredContentControl2")));
     this.grid2              = ((System.Windows.Controls.Grid)(this.FindName("grid2")));
     this.btnOk              = ((System.Windows.Controls.Button)(this.FindName("btnOk")));
     this.btnPrint           = ((System.Windows.Controls.Button)(this.FindName("btnPrint")));
     this.dgt_searchResult   = ((System.Windows.Controls.DataGrid)(this.FindName("dgt_searchResult")));
     this.lbl_cashier        = ((System.Windows.Controls.Label)(this.FindName("lbl_cashier")));
     this.txt_ref            = ((System.Windows.Controls.TextBox)(this.FindName("txt_ref")));
     this.cbo_ref            = ((System.Windows.Controls.ComboBox)(this.FindName("cbo_ref")));
     this.btn_Search         = ((System.Windows.Controls.Button)(this.FindName("btn_Search")));
     this.lbl_status         = ((System.Windows.Controls.Label)(this.FindName("lbl_status")));
     this.rdb_direct         = ((System.Windows.Controls.RadioButton)(this.FindName("rdb_direct")));
     this.rdb_manual         = ((System.Windows.Controls.RadioButton)(this.FindName("rdb_manual")));
     this.lbl_receipt        = ((System.Windows.Controls.Label)(this.FindName("lbl_receipt")));
     this.txt_receipt        = ((System.Windows.Controls.TextBox)(this.FindName("txt_receipt")));
     this.lbl_paymday        = ((System.Windows.Controls.Label)(this.FindName("lbl_paymday")));
     this.btn_reset          = ((System.Windows.Controls.Button)(this.FindName("btn_reset")));
     this.dtpDate_paymentDay = ((System.Windows.Controls.DatePicker)(this.FindName("dtpDate_paymentDay")));
 }
 private void expanderMain_OnLoaded(object sender, RoutedEventArgs e)
 {
     HeaderedContentControl headeredContentControl = new HeaderedContentControl
     {
         OverridesDefaultStyle = true,
         Foreground = Brushes.Black,
         Header = "Azure Webhook Identity"
     };
     this.ExpanderMain.Header = headeredContentControl;
 }
コード例 #9
0
		private void TryCycleOption(HeaderedContentControl control)
        {
            OptionSelector selector = control.Content as OptionSelector;
            if (selector != null)
            {
                selector.SelectedIndex++;
                if (selector.SelectedIndex >= selector.Options.Count)
                {
                    selector.SelectedIndex = 0;
                }
            }
        }
コード例 #10
0
 internal static void PreparePrepareHeaderedContentControlContainerForItemOverride(
     HeaderedContentControl element, object item, ItemsControl parent, Style parentItemContainerStyle)
 {
     if (element != item)
     {
         // We do not have proper access to Visual.
         // Nor do we keep track of the HeaderIsItem property.
         if (!(item is UIElement) && HasDefaultValue(element, HeaderProperty))
         {
             element.Header = item;
         }
     }
 }
		private HeaderedContentControl PresentTooltipContents([CanBeNull] object header, [NotNull] IEnumerable<ITooltipContent> tooltipContents) {
			var control = new HeaderedContentControl {
				Style = UIResources.Instance.HeaderedContentControlStyle,
				Focusable = false,
				Header = header,
				Content = new ItemsControl {
					Focusable = false,
					ItemsSource = tooltipContents
				}
			};
			ApplyFormatting(control);
			return control;
		}
コード例 #12
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.leftNavHeaderContentControl = ((System.Windows.Controls.HeaderedContentControl)(target));
                return;

            case 2:
                this.workSpaceHeaderContentControl = ((System.Windows.Controls.HeaderedContentControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #13
0
		private void OnInitialized(object sender, EventArgs e)
		{
			_fadeIn = (Storyboard)FindResource("FadeIn");
            _fadeOut = (Storyboard)FindResource("FadeOut");

            _fadeIn.Completed += OnFadeInCompleted;

            _texDetail = (HeaderedContentControl)FindName("TexDetail");
            _aalias = (HeaderedContentControl)FindName("AAlias");
            _soundVol = (HeaderedContentControl)FindName("SoundVol");
            _videoRes = (HeaderedContentControl)FindName("VideoRes");
            _gamma = (HeaderedContentControl)FindName("Gamma");
            _subtitles = (HeaderedContentControl)FindName("Subtitles");
            _back = (ToggleButton)FindName("Back");
			
			PreviewKeyDown += ProcessKeyDown;
		}
コード例 #14
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.hccCat1 = ((System.Windows.Controls.HeaderedContentControl)(target));
                return;

            case 2:
                this.gpCat2 = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 3:
                this.expCat3 = ((System.Windows.Controls.Expander)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #15
0
ファイル: SettingsMenu.xaml.cs プロジェクト: kesuke/Tutorials
		public void OnPostInit()
		#endif
		{
			_fadeIn = (Storyboard)FindResource("FadeIn");
            _fadeOut = (Storyboard)FindResource("FadeOut");

            _fadeIn.Completed += OnFadeInCompleted;

            _texDetail = (HeaderedContentControl)FindName("TexDetail");
            _aalias = (HeaderedContentControl)FindName("AAlias");
            _soundVol = (HeaderedContentControl)FindName("SoundVol");
            _videoRes = (HeaderedContentControl)FindName("VideoRes");
            _gamma = (HeaderedContentControl)FindName("Gamma");
            _subtitles = (HeaderedContentControl)FindName("Subtitles");
            _back = (ToggleButton)FindName("Back");
			
			PreviewKeyDown += ProcessKeyDown;
		}
コード例 #16
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Galatee.Silverlight;component/Shared/FrmRechercheClient.xaml", System.UriKind.Relative));
     this.LayoutRoot   = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.gbo_typefact = ((SilverlightContrib.Controls.GroupBox)(this.FindName("gbo_typefact")));
     this.groupBox1    = ((SilverlightContrib.Controls.GroupBox)(this.FindName("groupBox1")));
     this.stackPanel1  = ((System.Windows.Controls.StackPanel)(this.FindName("stackPanel1")));
     this.amount       = ((System.Windows.Controls.RadioButton)(this.FindName("amount")));
     this.routeNumb    = ((System.Windows.Controls.RadioButton)(this.FindName("routeNumb")));
     this.name         = ((System.Windows.Controls.RadioButton)(this.FindName("name")));
     this.bill         = ((System.Windows.Controls.RadioButton)(this.FindName("bill")));
     this.content      = ((System.Windows.Controls.HeaderedContentControl)(this.FindName("content")));
     this.container    = ((System.Windows.Controls.Viewbox)(this.FindName("container")));
 }
コード例 #17
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Galatee.Silverlight;component/Shared/UcsearchBill---.xaml", System.UriKind.Relative));
     this.viewbox1 = ((System.Windows.Controls.Viewbox)(this.FindName("viewbox1")));
     this.grid1    = ((System.Windows.Controls.Grid)(this.FindName("grid1")));
     this.label1   = ((System.Windows.Controls.Label)(this.FindName("label1")));
     this.label2   = ((System.Windows.Controls.Label)(this.FindName("label2")));
     this.headeredContentControl3 = ((System.Windows.Controls.HeaderedContentControl)(this.FindName("headeredContentControl3")));
     this.grid3 = ((System.Windows.Controls.Grid)(this.FindName("grid3")));
     this.headeredContentControl1 = ((System.Windows.Controls.HeaderedContentControl)(this.FindName("headeredContentControl1")));
     this.grid2       = ((System.Windows.Controls.Grid)(this.FindName("grid2")));
     this.Txt_docFrom = ((System.Windows.Controls.TextBox)(this.FindName("Txt_docFrom")));
     this.Txt_docTo   = ((System.Windows.Controls.TextBox)(this.FindName("Txt_docTo")));
     this.btnCancel   = ((System.Windows.Controls.Button)(this.FindName("btnCancel")));
     this.btnsearch   = ((System.Windows.Controls.Button)(this.FindName("btnsearch")));
     this.Txt_from    = ((System.Windows.Controls.TextBox)(this.FindName("Txt_from")));
     this.Txt_to      = ((System.Windows.Controls.TextBox)(this.FindName("Txt_to")));
 }
コード例 #18
0
        /// <summary>
        /// HeaderProperty property changed handler.
        /// </summary>
        /// <param name="d">HeaderedContentControl whose Header property is changed.</param>
        /// <param name="e">DependencyPropertyChangedEventArgs, which contains the old and new value.</param>
        private static void OnHeaderPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            HeaderedContentControl ctrl = (HeaderedContentControl)d;

            ctrl.OnHeaderChanged(e.OldValue, e.NewValue);
        }
コード例 #19
0
        /// <summary>
        /// HeaderTemplateProperty property changed handler.
        /// </summary>
        /// <param name="d">HeaderedContentControl whose HeaderTemplate property is changed.</param>
        /// <param name="e">DependencyPropertyChangedEventArgs, which contains the old and new value.</param>
        private static void OnHeaderTemplatePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            HeaderedContentControl ctrl = (HeaderedContentControl)d;

            ctrl.OnHeaderTemplateChanged((DataTemplate)e.OldValue, (DataTemplate)e.NewValue);
        }
コード例 #20
0
        /// <summary>
        /// Creates the content control and property panel.
        /// </summary>
        /// <param name="g">The g.</param>
        /// <param name="tabItems">The tab items.</param>
        /// <param name="index">The index.</param>
        /// <param name="fillTab">Stretch the panel if set to <c>true</c>.</param>
        /// <returns>
        /// The property panel.
        /// </returns>
        private Panel CreatePropertyPanel(Group g, Grid tabItems, int index, bool fillTab)
        {
            if (fillTab)
            {
                var p = new Grid();
                tabItems.Children.Add(p);
                Grid.SetRow(p, tabItems.RowDefinitions.Count);
                tabItems.RowDefinitions.Add(
                    new System.Windows.Controls.RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
                return p;
            }

            var propertyPanel = new StackPanelEx();

            HeaderedContentControl groupContentControl = null;
            switch (this.CategoryControlType)
            {
                case CategoryControlType.GroupBox:
                    groupContentControl = new GroupBox { Margin = new Thickness(0, 4, 0, 4) };
                    break;
                case CategoryControlType.Expander:
                    groupContentControl = new Expander { IsExpanded = index == 0 };
                    break;
                case CategoryControlType.Template:
                    groupContentControl = new HeaderedContentControl
                    {
                        Template = this.CategoryControlTemplate,
                        Focusable = false
                    };
                    break;
            }

            if (groupContentControl != null)
            {
                if (this.CategoryHeaderTemplate != null)
                {
                    groupContentControl.HeaderTemplate = this.CategoryHeaderTemplate;
                    groupContentControl.Header = g;
                }
                else
                {
                    groupContentControl.Header = g.Header;
                }

                // Hide the group control if all child properties are invisible.
                groupContentControl.SetBinding(
                    UIElement.VisibilityProperty,
                    new Binding("VisibleChildrenCount")
                    {
                        Source = propertyPanel,
                        Converter = ZeroToVisibilityConverter
                    });

                if (this.LabelWidthSharing == LabelWidthSharing.SharedInGroup)
                {
                    Grid.SetIsSharedSizeScope(propertyPanel, true);
                }

                groupContentControl.Content = propertyPanel;
                tabItems.Children.Add(groupContentControl);
                Grid.SetRow(groupContentControl, tabItems.RowDefinitions.Count);

                tabItems.RowDefinitions.Add(new System.Windows.Controls.RowDefinition { Height = GridLength.Auto });
            }

            return propertyPanel;
        }
コード例 #21
0
        internal HeaderedContentModelTreeEnumerator(HeaderedContentControl headeredContentControl, object content, object header) : base(header) 
        {
            Debug.Assert(headeredContentControl != null, "headeredContentControl should be non-null."); 
            Debug.Assert(header != null, "Header should be non-null. If Header was null, the base ContentControl enumerator should have been used.");

            _owner = headeredContentControl;
            _content = content; 
        }
コード例 #22
0
        /// <summary>
        ///     Called when HeaderStringFormatProperty is invalidated on "d."
        /// </summary>
        private static void OnHeaderStringFormatChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            HeaderedContentControl ctrl = (HeaderedContentControl)d;

            ctrl.OnHeaderStringFormatChanged((String)e.OldValue, (String)e.NewValue);
        }
コード例 #23
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.docPanelWindow = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 2:
                this.docPanelMenu = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 3:
                this.menu = ((System.Windows.Controls.Menu)(target));
                return;

            case 4:
                this.E_xit = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 5:
                this.grid = ((System.Windows.Controls.Grid)(target));
                return;

            case 6:
                this.ControlPanel = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 7:
                this.WorkSpaces = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 8:
                this.Buttons = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 9:
                this.borderControlPanel = ((System.Windows.Controls.Border)(target));
                return;

            case 10:
                this.hccControlPanel = ((System.Windows.Controls.HeaderedContentControl)(target));
                return;

            case 11:
                this.border1 = ((System.Windows.Controls.Border)(target));
                return;

            case 12:
                this.Back = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 13:
                this.dot = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 14:
                this.toggleButton = ((System.Windows.Controls.Button)(target));
                return;

            case 15:
                this.borderToggle = ((System.Windows.Controls.Border)(target));
                return;

            case 16:
                this.borderWorkSpaces = ((System.Windows.Controls.Border)(target));
                return;

            case 17:
                this.hccWorkSpace = ((System.Windows.Controls.HeaderedContentControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #24
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 10 "..\..\..\MainWindow2.xaml"
                ((DMS.Presentation.MainWindow2)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.bannerFrame = ((System.Windows.Controls.Frame)(target));
                return;

            case 3:
                this.buttonUpdate = ((System.Windows.Controls.Button)(target));

            #line 67 "..\..\..\MainWindow2.xaml"
                this.buttonUpdate.Click += new System.Windows.RoutedEventHandler(this.buttonUpdate_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.buttonSearch = ((System.Windows.Controls.Button)(target));

            #line 68 "..\..\..\MainWindow2.xaml"
                this.buttonSearch.Click += new System.Windows.RoutedEventHandler(this.buttonSearch_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.buttonSave = ((System.Windows.Controls.Button)(target));

            #line 76 "..\..\..\MainWindow2.xaml"
                this.buttonSave.Click += new System.Windows.RoutedEventHandler(this.buttonSave_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.mainTab = ((System.Windows.Controls.TabControl)(target));

            #line 80 "..\..\..\MainWindow2.xaml"
                this.mainTab.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.mainTab_SelectionChanged);

            #line default
            #line hidden
                return;

            case 7:

            #line 82 "..\..\..\MainWindow2.xaml"
                ((System.Windows.Controls.TabItem)(target)).GotFocus += new System.Windows.RoutedEventHandler(this.TabItem_Animals_GotFocus);

            #line default
            #line hidden
                return;

            case 8:

            #line 88 "..\..\..\MainWindow2.xaml"
                ((System.Windows.Controls.TabItem)(target)).GotFocus += new System.Windows.RoutedEventHandler(this.TabItem_Calfs_GotFocus);

            #line default
            #line hidden
                return;

            case 9:

            #line 96 "..\..\..\MainWindow2.xaml"
                ((System.Windows.Controls.TabItem)(target)).GotFocus += new System.Windows.RoutedEventHandler(this.TabItem_Milking_GotFocus);

            #line default
            #line hidden
                return;

            case 10:

            #line 104 "..\..\..\MainWindow2.xaml"
                ((System.Windows.Controls.TabItem)(target)).GotFocus += new System.Windows.RoutedEventHandler(this.TabItem_AnimalMedicineRecord_GotFocus);

            #line default
            #line hidden
                return;

            case 11:

            #line 112 "..\..\..\MainWindow2.xaml"
                ((System.Windows.Controls.TabItem)(target)).GotFocus += new System.Windows.RoutedEventHandler(this.TabItem_EmployeeAttendance_GotFocus);

            #line default
            #line hidden
                return;

            case 12:

            #line 120 "..\..\..\MainWindow2.xaml"
                ((System.Windows.Controls.TabItem)(target)).GotFocus += new System.Windows.RoutedEventHandler(this.TabItem_Expenditures_GotFocus);

            #line default
            #line hidden
                return;

            case 13:

            #line 126 "..\..\..\MainWindow2.xaml"
                ((System.Windows.Controls.TabItem)(target)).GotFocus += new System.Windows.RoutedEventHandler(this.TabItem_Customers_GotFocus);

            #line default
            #line hidden
                return;

            case 14:

            #line 135 "..\..\..\MainWindow2.xaml"
                ((System.Windows.Controls.TabItem)(target)).GotFocus += new System.Windows.RoutedEventHandler(this.TabItem_Employees_GotFocus);

            #line default
            #line hidden
                return;

            case 15:

            #line 142 "..\..\..\MainWindow2.xaml"
                ((System.Windows.Controls.TabItem)(target)).GotFocus += new System.Windows.RoutedEventHandler(this.TabItem_AnimalInsemnation_GotFocus);

            #line default
            #line hidden
                return;

            case 16:

            #line 147 "..\..\..\MainWindow2.xaml"
                ((System.Windows.Controls.TabItem)(target)).GotFocus += new System.Windows.RoutedEventHandler(this.TabItem_AnimalStatus_GotFocus);

            #line default
            #line hidden
                return;

            case 17:
                this.searchHeader = ((System.Windows.Controls.HeaderedContentControl)(target));

            #line 172 "..\..\..\MainWindow2.xaml"
                this.searchHeader.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.HeaderedContentControl_MouseDoubleClick);

            #line default
            #line hidden
                return;

            case 18:
                this.frameSearch = ((System.Windows.Controls.Frame)(target));
                return;

            case 19:

            #line 179 "..\..\..\MainWindow2.xaml"
                ((System.Windows.Controls.HeaderedContentControl)(target)).MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.HeaderedContentControl_MouseDoubleClick);

            #line default
            #line hidden
                return;

            case 20:
                this.dataEntryFrame = ((System.Windows.Controls.Frame)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #25
0
        /// <summary>
        /// Creates the controls.
        /// </summary>
        /// <param name="instance">
        /// The instance.
        /// </param>
        /// <param name="items">
        /// The items.
        /// </param>
        public virtual void CreateControls(object instance, IEnumerable<PropertyItem> items)
        {
            if (this.tabControl == null)
            {
                return;
            }

            this.tabControl.Items.Clear();
            this.panelControl.Children.Clear();
            if (this.UseTabs)
            {
                this.tabControl.DataContext = instance;
            }
            else
            {
                this.panelControl.DataContext = instance;
            }

            this.tabControl.Visibility = this.UseTabs ? Visibility.Visible : Visibility.Hidden;
            this.scrollViewer.Visibility = !this.UseTabs ? Visibility.Visible : Visibility.Hidden;

            if (items == null)
            {
                return;
            }

            HeaderedContentControl group = null;
            string currentTab = null;
            string currentCategory = null;

            StackPanel categoryItems = null;
            Panel tabItems = null;

            double maxLabelWidth = this.MinimumLabelWidth;

            foreach (var pi in items)
            {
                if (currentTab == null || !currentTab.Equals(pi.Tab))
                {
                    tabItems = new StackPanel();

                    if (this.UseTabs)
                    {
                        var scroller = new ScrollViewer
                            {
                                VerticalScrollBarVisibility = ScrollBarVisibility.Auto,
                                Content = tabItems
                            };
                        var tab = new TabItem { Header = pi.Tab, Content = scroller };

                        if (this.TabHeaderTemplate != null)
                        {
                            tab.Header = new HeaderViewModel { Header = pi.Tab, Icon = pi.TabIcon };
                            tab.HeaderTemplate = this.TabHeaderTemplate;
                        }

                        this.tabControl.Items.Add(tab);
                    }
                    else
                    {
                        this.panelControl.Children.Add(tabItems);
                    }

                    if (this.TabPageHeaderTemplate != null)
                    {
                        var hc = new ContentControl
                            {
                                ContentTemplate = this.TabPageHeaderTemplate,
                                Content =
                                    new HeaderViewModel
                                        {
                                            Header = pi.Tab,
                                            Description = pi.TabDescription,
                                            Icon = pi.TabIcon
                                        }
                            };
                        tabItems.Children.Add(hc);
                    }

                    currentTab = pi.Tab;
                    currentCategory = null;
                }

                if (currentCategory == null || !currentCategory.Equals(pi.Category))
                {
                    categoryItems = new StackPanelEx();

                    switch (this.CategoryControlType)
                    {
                        case CategoryControlType.GroupBox:
                            group = new GroupBox { Margin = new Thickness(0, 4, 0, 4) };
                            break;
                        case CategoryControlType.Expander:
                            group = new Expander { IsExpanded = currentCategory == null };
                            break;
                        case CategoryControlType.Template:
                            group = new HeaderedContentControl { Template = this.CategoryControlTemplate };
                            break;
                    }

                    if (group != null)
                    {
                        if (this.CategoryHeaderTemplate != null)
                        {
                            group.HeaderTemplate = this.CategoryHeaderTemplate;
                            group.Header = new HeaderViewModel
                                {
                                    Header = pi.Category,
                                    Description = pi.CategoryDescription,
                                    Icon = pi.CategoryIcon
                                };
                        }
                        else
                        {
                            group.Header = pi.Category;
                        }

                        // Hide the group control if all child properties are invisible.
                        group.SetBinding(
                            VisibilityProperty,
                            new Binding("VisibleChildrenCount")
                                {
                                    Source = categoryItems,
                                    Converter = ZeroToVisibilityConverter
                                });

                        group.Content = categoryItems;
                        tabItems.Children.Add(group);
                    }

                    currentCategory = pi.Category;
                }

                // create the property panel (label, tooltip icon and property control)
                var propertyPanel = this.CreatePropertyPanel(pi, instance, ref maxLabelWidth);
                categoryItems.Children.Add(propertyPanel);
            }

            // set the label width to the calculated max label width
            this.ActualLabelWidth = maxLabelWidth;

            int index = this.tabControl.SelectedIndex;
            if (index >= this.tabControl.Items.Count || (uint)index == 0xffffffff)
            {
                index = 0;
            }

            if (this.tabControl.Items.Count > 0)
            {
                this.tabControl.SelectedItem = this.tabControl.Items[index];
            }
        }
コード例 #26
0
		public DataGridResultViewer(OutputViewer outputViewer, StatementExecutionResult executionResult, ResultInfo resultInfo)
		{
			_outputViewer = outputViewer;
			_executionResult = executionResult;
			_resultInfo = resultInfo;

			Title = resultInfo.Title;

			InitializeComponent();

			var header =
				new HeaderedContentControl
				{
					Content = new AccessText { Text = Title }
				};

			TabItem =
				new TabItem
				{
					Header = header,
					Content = this
				};

			header.MouseEnter += DataGridTabHeaderMouseEnterHandler;

			_refreshProgressBarTimer = new DispatcherTimer(DispatcherPriority.Normal, Dispatcher) { Interval = TimeSpan.FromSeconds(0.25) };
			_refreshProgressBarTimer.Tick += RefreshTimerProgressBarTickHandler;
		}
コード例 #27
0
        private static void translateHeader(HeaderedContentControl control) {
            if (control.Header == null)
                return;

            string string_title = control.Header.ToString();
            translateHeader(control, string_title);
        }
コード例 #28
0
 internal static void PreparePrepareHeaderedContentControlContainerForItemOverride(HeaderedContentControl element, object item, ItemsControl parent, Style parentItemContainerStyle)
 {
     if (element != item)
     {
         // We do not have proper access to Visual.
         // Nor do we keep track of the HeaderIsItem property.
         if (!(item is UIElement) && HasDefaultValue(element, HeaderProperty))
         {
             element.Header = item;
         }
     }
 }
コード例 #29
0
 private static void translateHeader(HeaderedContentControl control, string name, params string[] variables) {
     TranslateableString str = Strings.getInterfaceString(name)[StringType.Label];
     control.Header = str.interpret(variables);
 }
コード例 #30
0
ファイル: SettingsMenu.xaml.cs プロジェクト: kesuke/Tutorials
 private void TryToggleCheck(HeaderedContentControl control)
 {
     CheckBox check = control.Content as CheckBox;
     if (check != null)
     {
         check.IsChecked = !check.IsChecked;
     }
 }
コード例 #31
0
		private void AddTab(Selector tabControl, TabType tabType)
		{
			HeaderedContentControl tab = GetTabItem();
			tabControl.Items.Add(tab);
			tabControls.Add(tabType, tab);

			Grid tabGrid = new Grid();
			tab.Content = tabGrid;
			tabGrid.HorizontalAlignment = HorizontalAlignment.Stretch;
			tabGrid.VerticalAlignment = VerticalAlignment.Top;
			AddColumnDefinition(tabGrid, 120);
			AddColumnDefinition(tabGrid);

			if (tabType == TabType.Credentials)
			{
				tab.Header = ApiAuthManager.LoginWindowCredentialsTabText;
				AddInputToTabGrid(tabGrid, ApiAuthManager.LoginWindowUserNameLabelText, EditorControlType.Username);
				AddInputToTabGrid(tabGrid, ApiAuthManager.LoginWindowPwdLabelText, EditorControlType.Password, true);
			}
			else if (tabType == TabType.Rally)
			{
				rallyTab = tab;
				tab.Header = ApiAuthManager.LoginWindowRallyServerTabText;
				AddInputToTabGrid(tabGrid, ApiAuthManager.LoginWindowConnectionTypeText, EditorControlType.ConnectionType);
				AddInputToTabGrid(tabGrid, ApiAuthManager.LoginWindowServerLabelText, EditorControlType.RallyServer);
				AddInputToTabGrid(tabGrid, ApiAuthManager.LoginWindowServerLabelText, EditorControlType.IdpServer);
				AddInputToTabGrid(tabGrid, ApiAuthManager.LoginWindowTrustAllCertificatesText, EditorControlType.TrustAllCertificates);
			}
			else if (tabType == TabType.Proxy)
			{
				tab.Header = ApiAuthManager.LoginWindowProxyServerTabText;
				AddInputToTabGrid(tabGrid, ApiAuthManager.LoginWindowProxyServerLabelText, EditorControlType.ProxyServer);
				AddInputToTabGrid(tabGrid, ApiAuthManager.LoginWindowProxyUserNameLabelText, EditorControlType.ProxyUsername);
				AddInputToTabGrid(tabGrid, ApiAuthManager.LoginWindowProxyPwdLabelText, EditorControlType.ProxyPassword, true);
			}
			else
				throw new NotImplementedException();

			if ((tabControl.Height.ToString().Equals("NaN", StringComparison.InvariantCultureIgnoreCase)) ||
				(tabControl.Height < tabGrid.Height + 20))
			{
				tabControl.Height = tabGrid.Height + 20;
				tabControl.MinHeight = tabControl.Height;
			}
		}