本文整理汇总了C#中Windows.UI.Xaml.UIElement.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# UIElement.GetValue方法的具体用法?C# UIElement.GetValue怎么用?C# UIElement.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Windows.UI.Xaml.UIElement
的用法示例。
在下文中一共展示了UIElement.GetValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetEdge
public static Edge GetEdge(UIElement element)
{
if (element == null)
{
throw new ArgumentNullException("element");
}
return (Edge)element.GetValue(EdgeProperty);
}
示例2: GetBindings
public static ObservableCollection<EventBinding> GetBindings(UIElement element)
{
var collection = (ObservableCollection<EventBinding>)element.GetValue(BindingsProperty);
if (collection == null)
{
collection = new ObservableCollection<EventBinding>();
SetBindings(element, collection);
}
return collection;
}
示例3: SetBindings
public static void SetBindings(UIElement element, ObservableCollection<EventBinding> value)
{
var existingCollection = (ObservableCollection<EventBinding>)element.GetValue(BindingsProperty);
if (existingCollection != null)
existingCollection.Clear(); //Cause all existing bound events to be unbound
if (value != null)
value.CollectionChanged += (s, e) => OnCollectionChanged(e, element);
element.SetValue(BindingsProperty, value);
}
示例4: GetBindings
public static VisualStateBindingCollection GetBindings(UIElement element)
{
var bindingCollection = element.GetValue(BindingsProperty) as VisualStateBindingCollection;
if (bindingCollection == null)
{
bindingCollection = new VisualStateBindingCollection();
element.SetValue(BindingsProperty, bindingCollection);
}
return bindingCollection;
}
示例5: GetAngle
public static double GetAngle(UIElement element)
{
return (double)element.GetValue(AngleProperty);
}
示例6: GetEffect
public static ICompositionEffect GetEffect(UIElement element) { return (ICompositionEffect)element.GetValue(EffectProperty); }
示例7: GetContainer
public static FrameworkElement GetContainer(UIElement element)
{
return (FrameworkElement)element.GetValue(ContainerProperty);
}
示例8: GetImageId
public static object GetImageId(UIElement element)
{
return element.GetValue(ImageIdProperty);
}
示例9: GetShowHelp
/// <summary>
/// Gets a value indicating if the help layer is displayed.
/// </summary>
/// <param name="element">UIElement instance.</param>
/// <returns>True if the help layer is displayed.</returns>
public static bool GetShowHelp(UIElement element)
{
return (bool)element.GetValue(ShowHelpProperty);
}
示例10: GetHelpText
/// <summary>
/// Gets the help text of the attached element.
/// </summary>
/// <param name="element">UIElement instance.</param>
/// <returns>Help text.</returns>
public static string GetHelpText(UIElement element)
{
return element.GetValue(HelpFrame.HelpTextProperty) as string;
}
示例11: GetItemsSourceBinding
public static IEnumerable GetItemsSourceBinding(UIElement element)
{
return (IEnumerable<MilesChartData>)element.GetValue(ItemsSourceBindingProperty);
}
示例12: GetTargetItemWidth
public static int GetTargetItemWidth(UIElement element)
{
return (int)element.GetValue(TargetItemWidthProperty);
}
示例13: GetCommand
public static ICommand GetCommand(UIElement element) {
return (ICommand)element.GetValue(CommandProperty);
}
示例14: GetUseCodeMargin
/// <summary>
/// Ruft einen Wert ab, der angibt ob das Margin des Rings im Codebehind gestezt werden soll oder nicht.
/// </summary>
/// <param name="element">Eine instanz von <see cref="Koopakiller.RadialSlider"/></param>
public static Boolean GetUseCodeMargin(UIElement element)
{
return (Boolean)element.GetValue(UseCodeMarginProperty);
}
示例15: GetIsLoading
public static bool GetIsLoading(UIElement element)
{
return (bool)element.GetValue(IsLoadingProperty);
}