当前位置: 首页>>代码示例>>C#>>正文


C# Control.GetValue方法代码示例

本文整理汇总了C#中Control.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# Control.GetValue方法的具体用法?C# Control.GetValue怎么用?C# Control.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Control的用法示例。


在下文中一共展示了Control.GetValue方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ApplyDesignerProperties

 internal static void ApplyDesignerProperties(Control target, Control source)
 {
     if (source.IsSet(WidthProperty))
         target.Width = source.GetValue(WidthProperty);
     if (source.IsSet(HeightProperty))
         target.Height = source.GetValue(HeightProperty);
     if (source.IsSet(DataContextProperty))
         target.DataContext = source.GetValue(DataContextProperty);
 }
开发者ID:Arlorean,项目名称:Perspex,代码行数:9,代码来源:Design.cs

示例2: GetIsTemplateFocusTarget

 /// <summary>
 /// Gets the value of the IsTemplateFocusTargetProperty attached property on a control.
 /// </summary>
 /// <param name="control">The control.</param>
 /// <returns>The property value.</returns>
 /// <see cref="SetIsTemplateFocusTarget(Control, bool)"/>
 public bool GetIsTemplateFocusTarget(Control control)
 {
     return control.GetValue(IsTemplateFocusTargetProperty);
 }
开发者ID:CarlSosaDev,项目名称:Avalonia,代码行数:10,代码来源:TemplatedControl.cs

示例3: GetWidth

 public static double GetWidth(Control control)
 {
     return control.GetValue(WidthProperty);
 }
开发者ID:Arlorean,项目名称:Perspex,代码行数:4,代码来源:Design.cs

示例4: GetDataContext

 public static object GetDataContext(Control control)
 {
     return control.GetValue(DataContextProperty);
 }
开发者ID:Arlorean,项目名称:Perspex,代码行数:4,代码来源:Design.cs

示例5: GetDock

 /// <summary>
 /// Gets the value of the Dock attached property on the specified control.
 /// </summary>
 /// <param name="control">The control.</param>
 /// <returns>The Dock attached property.</returns>
 public static Dock GetDock(Control control)
 {
     return control.GetValue(DockProperty);
 }
开发者ID:abdelkarim,项目名称:Perspex,代码行数:9,代码来源:DockPanel.cs

示例6: GetHeight

 public static double GetHeight(Control control)
 {
     return control.GetValue(HeightProperty);
 }
开发者ID:Arlorean,项目名称:Perspex,代码行数:4,代码来源:Design.cs

示例7: GetNameScope

 /// <summary>
 /// Gets the value of the attached <see cref="NameScopeProperty"/> on a visual.
 /// </summary>
 /// <param name="visual">The visual.</param>
 /// <returns>The value of the NameScope attached property.</returns>
 public static INameScope GetNameScope(Control visual)
 {
     return visual.GetValue(NameScopeProperty);
 }
开发者ID:Arlorean,项目名称:Perspex,代码行数:9,代码来源:NameScope.cs

示例8: GetTip

 /// <summary>
 /// Gets the value of the ToolTip.Tip attached property.
 /// </summary>
 /// <param name="element">The control to get the property from.</param>
 /// <returns>
 /// The content to be displayed in the control's tooltip.
 /// </returns>
 public static object GetTip(Control element)
 {
     return element.GetValue(TipProperty);
 }
开发者ID:MarkWalls,项目名称:Perspex,代码行数:11,代码来源:ToolTip.cs

示例9: GetForeground

 /// <summary>
 /// Gets the value of the attached <see cref="ForegroundProperty"/> on a control.
 /// </summary>
 /// <param name="control">The control.</param>
 /// <returns>The foreground.</returns>
 public static Brush GetForeground(Control control)
 {
     return control.GetValue(ForegroundProperty);
 }
开发者ID:abdelkarim,项目名称:Perspex,代码行数:9,代码来源:TextBlock.cs

示例10: GetFontWeight

 /// <summary>
 /// Gets the value of the attached <see cref="FontWeightProperty"/> on a control.
 /// </summary>
 /// <param name="control">The control.</param>
 /// <returns>The font family.</returns>
 public static FontWeight GetFontWeight(Control control)
 {
     return control.GetValue(FontWeightProperty);
 }
开发者ID:abdelkarim,项目名称:Perspex,代码行数:9,代码来源:TextBlock.cs

示例11: GetFontStyle

 /// <summary>
 /// Gets the value of the attached <see cref="FontStyleProperty"/> on a control.
 /// </summary>
 /// <param name="control">The control.</param>
 /// <returns>The font family.</returns>
 public static FontStyle GetFontStyle(Control control)
 {
     return control.GetValue(FontStyleProperty);
 }
开发者ID:abdelkarim,项目名称:Perspex,代码行数:9,代码来源:TextBlock.cs

示例12: GetFontSize

 /// <summary>
 /// Gets the value of the attached <see cref="FontSizeProperty"/> on a control.
 /// </summary>
 /// <param name="control">The control.</param>
 /// <returns>The font family.</returns>
 public static double GetFontSize(Control control)
 {
     return control.GetValue(FontSizeProperty);
 }
开发者ID:abdelkarim,项目名称:Perspex,代码行数:9,代码来源:TextBlock.cs

示例13: GetFontFamily

 /// <summary>
 /// Gets the value of the attached <see cref="FontFamilyProperty"/> on a control.
 /// </summary>
 /// <param name="control">The control.</param>
 /// <returns>The font family.</returns>
 public static string GetFontFamily(Control control)
 {
     return control.GetValue(FontFamilyProperty);
 }
开发者ID:abdelkarim,项目名称:Perspex,代码行数:9,代码来源:TextBlock.cs


注:本文中的Control.GetValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。