public static Edge GetEdge(UIElement element) { if (element == null) { throw new ArgumentNullException("element"); } return (Edge)element.GetValue(EdgeProperty); }
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; }
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); }
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; }
public static double GetAngle(UIElement element) { return (double)element.GetValue(AngleProperty); }
public static ICompositionEffect GetEffect(UIElement element) { return (ICompositionEffect)element.GetValue(EffectProperty); }
public static FrameworkElement GetContainer(UIElement element) { return (FrameworkElement)element.GetValue(ContainerProperty); }
public static object GetImageId(UIElement element) { return element.GetValue(ImageIdProperty); }
/// <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); }
/// <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; }
public static IEnumerable GetItemsSourceBinding(UIElement element) { return (IEnumerable<MilesChartData>)element.GetValue(ItemsSourceBindingProperty); }
public static int GetTargetItemWidth(UIElement element) { return (int)element.GetValue(TargetItemWidthProperty); }
public static ICommand GetCommand(UIElement element) { return (ICommand)element.GetValue(CommandProperty); }
/// <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); }
public static bool GetIsLoading(UIElement element) { return (bool)element.GetValue(IsLoadingProperty); }
public static DataTemplate GetSectionTemplate(UIElement element) { return element.GetValue(SectionTemplateProperty) as DataTemplate; }
/// <summary> /// Gets a value indicating the alignment of the help frame on top of the associated element. /// </summary> /// <param name="element">Associated element.</param> /// <returns>Value of the HelpFrameAlignment enumeration.</returns> public static HelpFrameAlignment GetAlignment(UIElement element) { return (HelpFrameAlignment)element.GetValue(AlignmentProperty); }
public static CompositeTransform GetRotateLeft(UIElement element) { return (CompositeTransform)element.GetValue(RotateProperty); }
/// <summary> /// Gets a value indicating if the help layer is displayed. /// </summary> /// <param name="element">UIElement element.</param> /// <returns>True to display the layer, otherwise false.</returns> public static bool GetShowBackgroundLayer(UIElement element) { return (bool)element.GetValue(ShowBackgroundLayerProperty); }
public static double GetRPM(UIElement element) { return (double)element.GetValue(RPMProperty); }
/// <summary> /// Gets internal HelpLayer instance to attach to the root layout panel of the page. /// </summary> /// <param name="element">UIElement instance.</param> /// <returns>HelpLayer instance.</returns> private static HelpLayer GetLayer(UIElement element) { return (HelpLayer)element.GetValue(LayerProperty); }
public static double GetLinearVelocity(UIElement element) { return (double)element.GetValue(LinearVelocityProperty); }
/// <summary>Gets a value indicating whether the tilt effect for the <see cref="UIElement"/> is enabled. </summary> /// <param name="element">The element. </param> public static bool GetIsTiltEnabled(UIElement element) { return (bool) element.GetValue(IsTiltEnabledProperty); }
public static bool GetHideMoreButton(UIElement element) { if (element == null) throw new ArgumentNullException(nameof(element)); return (bool)element.GetValue(HideMoreButtonProperty); }
public static double GetWidth(UIElement element) { return (double)element.GetValue(WidthProperty); }
public static Dock GetDock(UIElement obj) { return (Dock)obj.GetValue(DockProperty); }
public static Point GetPosition(UIElement element) { return (Point)element.GetValue(PositionProperty); }
public static object GetDataSource(UIElement element) { return element.GetValue(DataSourceProperty); }
public static double GetYPosition(UIElement element) { return (double)element.GetValue(YPositionProperty); }
public static DataTemplate GetHeaderTemplate(UIElement element) { return element.GetValue(HeaderTemplateProperty) as DataTemplate; }