當前位置: 首頁>>代碼示例>>C#>>正文


C# Controls.Panel類代碼示例

本文整理匯總了C#中System.Windows.Controls.Panel的典型用法代碼示例。如果您正苦於以下問題:C# Panel類的具體用法?C# Panel怎麽用?C# Panel使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Panel類屬於System.Windows.Controls命名空間,在下文中一共展示了Panel類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GetInsertPosition

		private int GetInsertPosition(Panel panel)
		{
			if (placement == AxisPlacement.Bottom)
				return panel.Children.Count;
			else
				return 0;
		}
開發者ID:XiBeichuan,項目名稱:hydronumerics,代碼行數:7,代碼來源:HorizontalAxisTitle.cs

示例2: Loading

 public void Loading(Panel parent)
 {
     ContentBorder.Visibility = Visibility.Collapsed;
     parent.Children.Add(this);
     FadeInBackground.Begin();
     _wait = true;
 }
開發者ID:lovlka,項目名稱:cornball-silverlight,代碼行數:7,代碼來源:Dialog.xaml.cs

示例3: FillList

 public void FillList(Panel list, Action<AutoCompleteItem> selectWithClick, List<IRecyclable> recyclables)
 {
     foreach (var item in this.list)
     {
         item.CreateFrameworkElement(list, selectWithClick, recyclables, this);
     }
 }
開發者ID:Nukil,項目名稱:toggldesktop,代碼行數:7,代碼來源:AutoCompleteController.cs

示例4: ProcessorFamily

            public ProcessorFamily(Panel parentPanel, int idx, string name)
            {
                Index = idx;
                Name = name;
                SelectedProcessor = null;

                LabelName = new Label();
                LabelName.Content = "Choose " + name;
                DockPanel.SetDock(LabelName, Dock.Top);
                LabelName.Height = 30.0;
                LabelName.HorizontalContentAlignment = HorizontalAlignment.Center;
                parentPanel.Children.Add(LabelName);

                ComboProcessors = new ComboBox();
                DockPanel.SetDock(ComboProcessors, Dock.Top);
                ComboProcessors.Height = 25.0;
                ComboProcessors.Margin = new Thickness(30.0, 5.0, 30.0, 5.0);
                ComboProcessors.HorizontalContentAlignment = HorizontalAlignment.Center;
                parentPanel.Children.Add(ComboProcessors);

                ComboProcessors.SelectionChanged += ComboProcessors_SelectionChanged;

                ParametersPanel = new ParametersSelectionPanel();
                ParametersPanel.MinHeight = 20.0;
                DockPanel.SetDock(ParametersPanel, Dock.Top);
                parentPanel.Children.Add(ParametersPanel);
            }
開發者ID:KFlaga,項目名稱:Cam3D,代碼行數:27,代碼來源:ParametrizedProcessorsSelectionPanel.xaml.cs

示例5: OnApplyTemplate

 public override void OnApplyTemplate()
 {
     base.OnApplyTemplate();
     _tabScrollViewer = GetTemplateChild("TabScrollViewerTop") as ScrollViewer;
     _tabPanelTop = GetTemplateChild("HeaderPanel") as Panel;
     SelectionChanged += (s, e) => scrollToSelectedItem();
 }
開發者ID:yao-yi,項目名稱:DNTProfiler,代碼行數:7,代碼來源:ScrollableTabControl.cs

示例6: DrawKeys

 public void DrawKeys(Panel parentControl)
 {
     foreach (var key in _keyDictionary.Keys.Values)
     {
         parentControl.Children.Add(key);
     }
 }
開發者ID:WhiteWaterCoder,項目名稱:MrKeys,代碼行數:7,代碼來源:VirtualKeyBoard.cs

示例7: AddOptions

            protected override void AddOptions(Panel panel)
            {
                // add force low memory mode option
                var lowMemoryGroup = new WrapPanel();

                var cb = new CheckBox { Content = "Forced Low Memory Mode: allocate" };
                BindToOption(cb, ForceLowMemoryMode.Enabled);
                lowMemoryGroup.Children.Add(cb);

                var textBox = new TextBox { MinWidth = 60 };
                BindToOption(textBox, ForceLowMemoryMode.SizeInMegabytes);
                lowMemoryGroup.Children.Add(textBox);

                lowMemoryGroup.Children.Add(new TextBlock { Text = "megabytes of extra memory in devenv.exe" });

                panel.Children.Add(lowMemoryGroup);

                // add OOP feature options
                var oopFeatureGroup = new StackPanel();

                AddOption(oopFeatureGroup, NavigateToOptions.OutOfProcessAllowed, nameof(NavigateToOptions));
                AddOption(oopFeatureGroup, SymbolFinderOptions.OutOfProcessAllowed, nameof(SymbolFinderOptions));
                AddOption(oopFeatureGroup, SymbolSearchOptions.OutOfProcessAllowed, nameof(SymbolSearchOptions));

                panel.Children.Add(oopFeatureGroup);

                // and add the rest of the options
                base.AddOptions(panel);
            }
開發者ID:XieShuquan,項目名稱:roslyn,代碼行數:29,代碼來源:InternalFeaturesOnOffPage.cs

示例8: WPFGraphView

 //! 構造普通繪圖視圖
 public WPFGraphView(Panel container)
 {
     this._view = new WPFViewAdapter(this);
     this.CoreView = GiCoreView.createView(this._view);
     init(container);
     ActiveView = this;
 }
開發者ID:rhcad,項目名稱:vgwpf,代碼行數:8,代碼來源:WPFGraphView.cs

示例9: ResetChannelView

        //string[] Headers = { ResetOption.Header };
        //

        public ResetChannelView(Panel startPanel)
        {
            InitializeComponent();
            messages.Add(model);
            ResetOption.SetResetOption(new CheckBox[] { resetChannel1, resetChannel2, resetChannel3, resetChannel4 });
            StartPanel = startPanel;
        }
開發者ID:liroyma,項目名稱:SpeedDetector,代碼行數:10,代碼來源:ResetChannelView.xaml.cs

示例10: CreateTransitionAnimation

        /// <internalonly />
        protected override ProceduralAnimation CreateTransitionAnimation(Panel container, EffectDirection direction)
        {
            if (_scaleTransform == null) {
                _scaleTransform = new ScaleTransform();
                container.RenderTransform = _scaleTransform;

                container.RenderTransformOrigin = new Point(0.5, 0.5);
            }

            TweenInterpolation interpolation = GetEffectiveInterpolation();
            TimeSpan shortDuration = TimeSpan.FromMilliseconds(Duration.TotalMilliseconds / 3);

            FlipScaleAnimation scaleAnimation =
                new FlipScaleAnimation(Duration, _scaleTransform,
                                       (direction == EffectDirection.Forward ? 180 : -180));
            scaleAnimation.Interpolation = interpolation;

            DoubleAnimation frontAnimation =
                new DoubleAnimation(container.Children[1], UIElement.OpacityProperty, shortDuration,
                                    (direction == EffectDirection.Forward ? 0 : 1));
            frontAnimation.Interpolation = interpolation;
            frontAnimation.StartDelay = shortDuration;

            DoubleAnimation backAnimation =
                new DoubleAnimation(container.Children[0], UIElement.OpacityProperty, shortDuration,
                                    (direction == EffectDirection.Forward ? 1 : 0));
            backAnimation.Interpolation = interpolation;
            backAnimation.StartDelay = shortDuration;

            return new ProceduralAnimationSet(scaleAnimation, frontAnimation, backAnimation);
        }
開發者ID:ssssyin,項目名稱:silverlightfx,代碼行數:32,代碼來源:Flip.cs

示例11: AddComponentInspectorsRecursively

        /// <summary>
        ///   Adds inspectors for the components of the specified blueprint and its parents.
        /// </summary>
        /// <param name="viewModel">Blueprint to add component inspectors for.</param>
        /// <param name="panel">Panel to add inspectors to.</param>
        /// <param name="getPropertyValue">Callback to get current value for a property.</param>
        /// <param name="onValueChanged">Callback to invoke when a property value changed.</param>
        public void AddComponentInspectorsRecursively(
            BlueprintViewModel viewModel,
            Panel panel,
            GetPropertyValueDelegate getPropertyValue,
            InspectorControlValueChangedDelegate onValueChanged)
        {
            // Add inspectors for parent blueprints.
            if (viewModel.Parent != null)
            {
                this.AddComponentInspectorsRecursively(viewModel.Parent, panel, getPropertyValue, onValueChanged);
            }

            // Add inspectors for specified blueprint.
            foreach (var componentType in viewModel.AddedComponents)
            {
                // Get attributes.
                InspectorType componentInfo = InspectorComponentTable.Instance.GetInspectorType(componentType);
                if (componentInfo == null)
                {
                    continue;
                }

                this.AddInspectorControls(componentInfo, panel, getPropertyValue, onValueChanged);
            }
        }
開發者ID:jixiang111,項目名稱:slash-framework,代碼行數:32,代碼來源:InspectorFactory.cs

示例12: AddLabel

 private void AddLabel(Panel parent, string labelString)
 {
     Label dname = new Label();
     dname.Content = labelString;
     dname.Style = (Style)FindResource("AddressStyle");
     parent.Children.Add(dname);
 }
開發者ID:scsuvizlab,項目名稱:SE3900Projects,代碼行數:7,代碼來源:SurGISContPanel1.xaml.cs

示例13: RTCView

 public RTCView(Panel startPanel)
 {
     InitializeComponent();
     StartPanel = startPanel;
     model = new RTCModel(txtUnitDate, txtCPUDate);
     messages.Add(model);
 }
開發者ID:liroyma,項目名稱:SpeedDetector,代碼行數:7,代碼來源:RTCView.xaml.cs

示例14: WPFGraphView

 //! 構造放大鏡繪圖視圖
 public WPFGraphView(WPFGraphView mainView, Panel container)
 {
     this.CoreView = new GiCoreView(mainView.CoreView);
     this._view = new WPFViewAdapter(this);
     this.CoreView.createMagnifierView(this._view, mainView.ViewAdapter);
     init(container);
 }
開發者ID:nhbcyz,項目名稱:TouchVG,代碼行數:8,代碼來源:WPFGraphView.cs

示例15: DocUITabbed

 public DocUITabbed(XmlNode xmlNode, XmlSchemaAnnotated xsdNode, Panel contentpanel, Panel overlaypanel, DynamicForm parentForm)
     : base(xmlNode, xsdNode, contentpanel, overlaypanel, parentForm)
 {
     this.Sideways = true;
     _tabControl = new TabControl();
     this.Control = _tabControl;
     _optlist = new List<AbstractDocUIComponent>();
     XmlSchemaElement schemaEl = xsdNode as XmlSchemaElement;
     if (schemaEl != null)
     {
         XmlSchemaSequence seq = XmlSchemaUtilities.tryGetSequence(schemaEl.ElementSchemaType);
         if (seq != null)
         {
             foreach (XmlSchemaElement el in seq.Items)
             {
                 TabItem ti = new TabItem();
                 ti.Header = XmlSchemaUtilities.tryGetDocumentation(el); ;
                 Grid newpanel = new Grid();
                 ColumnDefinition cdnew1 = new ColumnDefinition();
                 cdnew1.Width = new GridLength(1, GridUnitType.Auto);
                 ColumnDefinition cdnew2 = new ColumnDefinition();
                 newpanel.ColumnDefinitions.Add(cdnew1);
                 newpanel.ColumnDefinitions.Add(cdnew2);
                 Utilities.recursive(el, xmlNode.SelectSingleNode(el.Name), newpanel, overlaypanel, (comp) =>
                 {
                     _optlist.Add(comp);
                     comp.placeOption();
                 }, parentForm);
                 ti.Content = newpanel;
                 this._tabControl.Items.Add(ti);
             }
         }
     }
 }
開發者ID:00Green27,項目名稱:DocUI,代碼行數:34,代碼來源:DocUITabbed.cs


注:本文中的System.Windows.Controls.Panel類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。