Exemplo n.º 1
0
 public static double GetSize(DependencyObject obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     ValidationHelper.OfTypes(obj, "obj", typeof(System.Windows.Controls.CheckBox), typeof(System.Windows.Controls.RadioButton));
     DoubleUtil.EnsureNonNegative();
     return(BoxingHelper <double> .Unbox(obj.GetValue(SizeProperty)));
 }
Exemplo n.º 2
0
        private static void OnStateChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            ValidationHelper.NotNull(obj, "obj");
            var progressBar = (ProgressBase)obj;

            progressBar.OnStateChanged(BoxingHelper <ProgressState> .Unbox(e.OldValue), BoxingHelper <ProgressState> .Unbox(e.NewValue));
        }
Exemplo n.º 3
0
        private static void OnPercentChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            ValidationHelper.NotNull(obj, "obj");
            var instance = (ProgressBase)obj;

            instance.OnPercentChanged(BoxingHelper <double> .Unbox(e.OldValue), BoxingHelper <double> .Unbox(e.NewValue));
        }
        private static void OnOrientationChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            ValidationHelper.NotNull(obj, () => obj);
            var instance = (ProgressBar)obj;

            instance.OnOrientationChanged(BoxingHelper <Orientation> .Unbox(e.OldValue), BoxingHelper <Orientation> .Unbox(e.NewValue));
        }
Exemplo n.º 5
0
        private static void OnTransitionModeChanged([NotNull] DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            ValidationHelper.NotNull(obj, () => obj);
            var instance = (ApplicationBar)obj;

            instance.OnTransitionModeChanged(BoxingHelper <ApplicationBarTransitionMode> .Unbox(e.OldValue),
                                             BoxingHelper <ApplicationBarTransitionMode> .Unbox(e.NewValue));
        }
Exemplo n.º 6
0
 public static ApplicationBarDock GetDock([NotNull] UIElement obj)
 {
     ValidationHelper.NotNull(obj, () => obj);
     return(BoxingHelper <ApplicationBarDock> .Unbox(obj.GetValue(DockProperty)));
 }
 public static Thickness GetSubmenuBorderThickness(System.Windows.Controls.Primitives.MenuBase obj)
 {
     ValidationHelper.NotNull(obj, () => obj);
     ThicknessUtil.EnsureNonNegative();
     return(BoxingHelper <Thickness> .Unbox(obj.GetValue(SubmenuBorderThicknessProperty)));
 }
 public static Thickness GetRadGridViewBorderThickness([NotNull] DependencyObject obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     ThicknessUtil.EnsureNonNegative();
     return(BoxingHelper <Thickness> .Unbox(obj.GetValue(RadGridViewBorderThicknessProperty)));
 }
Exemplo n.º 9
0
 public static double GetArrowSize([NotNull] System.Windows.Controls.ComboBox obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     DoubleUtil.EnsureNonNegative();
     return(BoxingHelper <double> .Unbox(obj.GetValue(ArrowSizeProperty)));
 }
Exemplo n.º 10
0
 public static Thickness GetDefaultThickness([NotNull] DependencyObject obj)
 {
     ValidationHelper.NotNull(obj, () => obj);
     ThicknessUtil.EnsureNonNegative();
     return(BoxingHelper <Thickness> .Unbox(obj.GetValue(DefaultThicknessProperty)));
 }
Exemplo n.º 11
0
 public static Thickness GetResizeBorderThickness([NotNull] Controls.Window obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     ThicknessUtil.EnsureNonNegative();
     return(BoxingHelper <Thickness> .Unbox(obj.GetValue(ResizeBorderThicknessProperty)));
 }
Exemplo n.º 12
0
 public static double GetBoldPaddingValue(DependencyObject obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     DoubleUtil.EnsureNonNegative();
     return(BoxingHelper <double> .Unbox(obj.GetValue(BoldPaddingValueProperty)));
 }
        private static bool IsValidOrientation(object value)
        {
            var orientation = BoxingHelper <Orientation> .Unbox(value);

            return(orientation == Orientation.Horizontal || orientation == Orientation.Vertical);
        }
Exemplo n.º 14
0
 public static double GetBulletDecoratorSize([NotNull] DependencyObject obj)
 {
     ValidationHelper.NotNull(obj, () => obj);
     DoubleUtil.EnsureNonNegative();
     return(BoxingHelper <double> .Unbox(obj.GetValue(BulletDecoratorSizeProperty)));
 }
Exemplo n.º 15
0
 public static Duration GetDefaultDuration([NotNull] DependencyObject obj)
 {
     ValidationHelper.NotNull(obj, () => obj);
     return(BoxingHelper <Duration> .Unbox(obj.GetValue(DefaultDurationProperty)));
 }
Exemplo n.º 16
0
 public static double GetSemiBoldThicknessValue([NotNull] DependencyObject obj)
 {
     ValidationHelper.NotNull(obj, () => obj);
     DoubleUtil.EnsureNonNegative();
     return(BoxingHelper <double> .Unbox(obj.GetValue(SemiBoldThicknessValueProperty)));
 }
 public static double GetAngle(UIElement obj)
 {
     ValidationHelper.NotNull(obj, () => obj);
     return(BoxingHelper <double> .Unbox(obj.GetValue(AngleProperty)));
 }
Exemplo n.º 18
0
 public static double GetCornerRadiusValue([NotNull] DependencyObject obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     ThicknessUtil.EnsureNonNegative();
     return(BoxingHelper <double> .Unbox(obj.GetValue(CornerRadiusValueProperty)));
 }
Exemplo n.º 19
0
 public static Thickness GetBoldPadding([NotNull] DependencyObject obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     ThicknessUtil.EnsureNonNegative();
     return(BoxingHelper <Thickness> .Unbox(obj.GetValue(BoldPaddingProperty)));
 }
Exemplo n.º 20
0
 public static double GetIndicatorThickness(System.Windows.Controls.TabControl obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     DoubleUtil.EnsureNonNegative();
     return(BoxingHelper <double> .Unbox(obj.GetValue(IndicatorThicknessProperty)));
 }
Exemplo n.º 21
0
 public static double GetBusyElementSize([NotNull] ProgressBase obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     DoubleUtil.EnsureNonNegative();
     return(BoxingHelper <double> .Unbox(obj.GetValue(BusyElementSizeProperty)));
 }
Exemplo n.º 22
0
 public static double GetContentFontSize([NotNull] DependencyObject obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     DoubleUtil.EnsureNonNegative();
     return(BoxingHelper <double> .Unbox(obj.GetValue(ContentFontSizeProperty)));
 }
Exemplo n.º 23
0
 public static double GetThumbThickness(Controls.ToggleSwitch obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     DoubleUtil.EnsureNonNegative();
     return(BoxingHelper <double> .Unbox(obj.GetValue(ThumbThicknessProperty)));
 }
Exemplo n.º 24
0
 public static Duration GetMaximumDuration([NotNull] DependencyObject obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     return(BoxingHelper <Duration> .Unbox(obj.GetValue(MaximumDurationProperty)));
 }
Exemplo n.º 25
0
 public static Thickness GetArrowMargin([NotNull] System.Windows.Controls.ComboBox obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     ThicknessUtil.EnsureNonNegative();
     return(BoxingHelper <Thickness> .Unbox(obj.GetValue(ArrowMarginProperty)));
 }
Exemplo n.º 26
0
 public static Elysium.Animation GetType(UIElement obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     AnimationUtil.EnsureValid(obj);
     return(BoxingHelper <Elysium.Animation> .Unbox(obj.GetValue(TypeProperty)));
 }
Exemplo n.º 27
0
 public static Elysium.Animation GetSupported(UIElement obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     return(BoxingHelper <Elysium.Animation> .Unbox(obj.GetValue(SupportedProperty)));
 }
Exemplo n.º 28
0
 public static double GetTrackSize([NotNull] Controls.ToggleSwitch obj)
 {
     ValidationHelper.NotNull(obj, () => obj);
     DoubleUtil.EnsureNonNegative();
     return(BoxingHelper <double> .Unbox(obj.GetValue(TrackSizeProperty)));
 }
Exemplo n.º 29
0
 public static double GetThumbThickness([NotNull] System.Windows.Controls.Slider obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     DoubleUtil.EnsureNonNegative();
     return(BoxingHelper <double> .Unbox(obj.GetValue(ThumbThicknessProperty)));
 }
Exemplo n.º 30
0
 public static FontStretch GetMyFontStretch([NotNull] DependencyObject obj)
 {
     ValidationHelper.NotNull(obj, "obj");
     ThicknessUtil.EnsureNonNegative();
     return(BoxingHelper <FontStretch> .Unbox(obj.GetValue(MyFontStretchProperty)));
 }