예제 #1
0
        public void BackgroundImage()
        {
            using (UIBarButtonItem btn = new UIBarButtonItem()) {
                Assert.Null(btn.GetBackgroundImage(UIControlState.Highlighted, UIBarMetrics.Default), "Get");
                btn.SetBackgroundImage(null, UIControlState.Highlighted, UIBarMetrics.Default);

                Assert.Null(btn.GetBackgroundImage(UIControlState.Highlighted, UIBarButtonItemStyle.Plain, UIBarMetrics.Default), "Get2");
                btn.SetBackgroundImage(null, UIControlState.Highlighted, UIBarButtonItemStyle.Plain, UIBarMetrics.Default);
            }
        }
예제 #2
0
        public void BackgroundImage()
        {
            using (UIBarButtonItem btn = new UIBarButtonItem()) {
                Assert.Null(btn.GetBackgroundImage(UIControlState.Highlighted, UIBarMetrics.Default), "Get");
                btn.SetBackgroundImage(null, UIControlState.Highlighted, UIBarMetrics.Default);

                if (TestRuntime.CheckSystemAndSDKVersion(6, 0))
                {
                    Assert.Null(btn.GetBackgroundImage(UIControlState.Highlighted, UIBarButtonItemStyle.Plain, UIBarMetrics.Default), "Get2");
                    btn.SetBackgroundImage(null, UIControlState.Highlighted, UIBarButtonItemStyle.Plain, UIBarMetrics.Default);
                }
            }
        }