本文整理汇总了C#中System.Windows.Controls.Panel类的典型用法代码示例。如果您正苦于以下问题:C# Panel类的具体用法?C# Panel怎么用?C# Panel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Panel类属于System.Windows.Controls命名空间,在下文中一共展示了Panel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: OnApplyTemplate
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
HorizontalContentAlignment = System.Windows.HorizontalAlignment.Stretch;
_templateRoot = MoreVisualTreeExtensions.FindFirstChildOfType<Panel>(this);
if (_templateRoot == null)
{
throw new InvalidOperationException("Must include a Panel in the root of the template.");
}
if (!_transitionedIn)
{
var @in = GetTransitionIn();
if (@in != null && _templateRoot != null)
{
var transition = @in.GetTransition(_templateRoot);
transition.Completed += (x, xe) => transition.Stop();
transition.Begin();
}
_transitionedIn = true;
}
}
开发者ID:TediWang,项目名称:4thandmayor-ancient,代码行数:25,代码来源:WindowBase.cs
示例17: DocUIMultiSelect
/// <summary>
/// Creates a new instance of MultiSelectOption
/// </summary>
/// <param name="xmlNode">The xmlNode that contains the data.</param>
/// <param name="xsdNode">The corresponding xsdNode.</param>
/// <param name="panel">The panel on which the option should be placed.</param>
/// <param name="parentForm">The form of which this option is a part.</param>
public DocUIMultiSelect(XmlNode xmlNode, XmlSchemaAnnotated xsdNode, Panel contentpanel, Panel overlaypanel, DynamicForm parentForm) :
base(xmlNode, xsdNode, contentpanel, overlaypanel, parentForm)
{
XmlSchemaElement schemaEl = xsdNode as XmlSchemaElement;
if (schemaEl != null)
{
XmlSchemaSequence seq = XmlSchemaUtilities.tryGetSequence(schemaEl.ElementSchemaType);
if (seq != null && seq.Items.Count > 0)
{
XmlSchemaElement el = seq.Items[0] as XmlSchemaElement;
IEnumerable<XmlSchemaEnumerationFacet> restrictions = XmlSchemaUtilities.tryGetEnumRestrictions(el.ElementSchemaType);
foreach (XmlSchemaEnumerationFacet e in restrictions)
{
AddOption(e.Value, FontWeights.Normal);
}
}
CheckBox all = AddOption("All", FontWeights.Bold);
all.Checked += (s, e) => { SelectAll(); };
all.Unchecked += (s, e) => { UnselectAll(); };
_wrapPanel.Orientation = Orientation.Horizontal;
Control = _wrapPanel;
setup();
}
}
开发者ID:00Green27,项目名称:DocUI,代码行数:36,代码来源:DocUIMultiSelect.cs
示例18: createFrameworkElement
protected override Panel createFrameworkElement(Panel parent, List<IRecyclable> recyclables)
{
Panel newPanel;
this.element = this.createElement(out newPanel, recyclables);
parent.Children.Add(this.element);
return newPanel;
}
开发者ID:alisheikh,项目名称:toggldesktop,代码行数:7,代码来源:NestedCategory.cs
示例19: OnUpdate
public void OnUpdate(Int64 lastMSec, Int64 curMSec, double scale, Panel container, NicoLabelListModel labels)
{
double w = container.ActualWidth;
double h = container.ActualHeight;
foreach (NicoComment comm in comments)
{
Int64 vposMSec = comm.VPos * 10;
if (vposMSec >= lastMSec && vposMSec < curMSec)
{
NicoLabel label = new NicoLabel();
// label.Background = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0));
// child of
container.Children.Add(label);
// label->setAttribute(Qt::WA_TransparentForMouseEvents);
label.SetByNicoComment(comm);
if (_noShadow)
{
label.SetShadowDepth(0);
}
label.Birth(w, h, scale);
label.DoMove((int)(curMSec - vposMSec));
labels.checkCollision(label, scale, container);
labels.Add(label);
}
}
}
开发者ID:b17ee518,项目名称:bbbd828931e18575f3db322f176dfd67,代码行数:30,代码来源:NicoCommentListModel.cs
示例20: FillList
public void FillList(Panel list, Action<AutoCompleteItem> selectWithClick)
{
foreach (var item in this.list)
{
item.CreateFrameworkElement(list, selectWithClick);
}
}
开发者ID:viktorm2015,项目名称:toggldesktop,代码行数:7,代码来源:AutoCompleteController.cs
注:本文中的System.Windows.Controls.Panel类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论