Ejemplo n.º 1
0
 public static Edge GetEdge(UIElement element)
 {
     if (element == null)
     {
         throw new ArgumentNullException("element");
     }
     return (Edge)element.GetValue(EdgeProperty);
 }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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;
        }
Ejemplo n.º 5
0
 public static double GetAngle(UIElement element)
 {
     return (double)element.GetValue(AngleProperty);
 }
Ejemplo n.º 6
0
 public static ICompositionEffect GetEffect(UIElement element) { return (ICompositionEffect)element.GetValue(EffectProperty); }
Ejemplo n.º 7
0
 public static FrameworkElement GetContainer(UIElement element)
 {
     return (FrameworkElement)element.GetValue(ContainerProperty);
 }
 public static object GetImageId(UIElement element)
 {
     return element.GetValue(ImageIdProperty);
 }
Ejemplo n.º 9
0
 /// <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);
 }
Ejemplo n.º 10
0
 /// <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);
 }
Ejemplo n.º 12
0
 public static int GetTargetItemWidth(UIElement element)
 {
     return (int)element.GetValue(TargetItemWidthProperty);
 }
Ejemplo n.º 13
0
 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);
 }
Ejemplo n.º 15
0
 public static bool GetIsLoading(UIElement element)
 {
     return (bool)element.GetValue(IsLoadingProperty);
 }
Ejemplo n.º 16
0
 public static DataTemplate GetSectionTemplate(UIElement element)
 {
     return element.GetValue(SectionTemplateProperty) as DataTemplate;
 }
Ejemplo n.º 17
0
 /// <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);
 }
Ejemplo n.º 18
0
 public static CompositeTransform GetRotateLeft(UIElement element)
 {
     return (CompositeTransform)element.GetValue(RotateProperty);
 }
Ejemplo n.º 19
0
 /// <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);
 }
Ejemplo n.º 20
0
 public static double GetRPM(UIElement element)
 {
     return (double)element.GetValue(RPMProperty);
 }
Ejemplo n.º 21
0
 /// <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);
 }
Ejemplo n.º 22
0
 public static double GetLinearVelocity(UIElement element)
 {
     return (double)element.GetValue(LinearVelocityProperty);
 }
Ejemplo n.º 23
0
 /// <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);
 }
Ejemplo n.º 25
0
 public static double GetWidth(UIElement element)
 {
     return (double)element.GetValue(WidthProperty);
 }
 public static Dock GetDock(UIElement obj)
 {
     return (Dock)obj.GetValue(DockProperty);
 }
Ejemplo n.º 27
0
 public static Point GetPosition(UIElement element)
 {
     return (Point)element.GetValue(PositionProperty);
 }
Ejemplo n.º 28
0
 public static object GetDataSource(UIElement element)
 {
     return element.GetValue(DataSourceProperty);
 }
Ejemplo n.º 29
0
 public static double GetYPosition(UIElement element)
 {
     return (double)element.GetValue(YPositionProperty);
 }
Ejemplo n.º 30
0
 public static DataTemplate GetHeaderTemplate(UIElement element)
 {
     return element.GetValue(HeaderTemplateProperty) as DataTemplate;
 }