Generic placeholder control to use when constructing.
Inheritance: System.Windows.Controls.UserControl, INotifyDisposed
        public void Initialize(TitleContainer control)
        {
            control.Width = 300;

            child = new Placeholder{Text = "My Child", Height = 250};

            control.Title = "My Title";
            control.Child = child;
        }
        public void ScrollViewer(ScrollViewer control)
        {
            control.Width = 300;
            control.Height = 200;

            var placeholder = new Placeholder { Height = 500 };
            control.Content = placeholder;
            control.SetValue(Behaviors.MouseWheelScrollerProperty, new MouseWheelScroller());
        }
        public void Initialize(Placeholder control)
        {
            control.Width = 150;
            control.Height = 150;
            viewModel = new MyViewModel();

            control.DataContext = viewModel;
            control.SetBinding(UIElement.OpacityProperty, new Binding("Opacity"));
        }
        public void Setup()
        {
            element = new Placeholder();
            behavior = new PositionSlider{Duration = 0.1};

            var canvas = new Canvas{Width = 500, Height = 500};
            canvas.Children.Add(element);

            Behaviors.SetPositionSlider(element, behavior);
        }
        public void Initialize(Canvas control)
        {
            control.Width = 500;
            control.Height = 500;
            control.Background = StyleResources.Colors["Brush.Black.005"] as Brush;

            element = new Placeholder();
            control.Children.Add(element);

        }
        public void ShouldGetDataContext()
        {
            var element = new Placeholder{DataContext = null};
            var model = new ObservableCollection<string>();

            element.GetDataContext().ShouldBe(null);

            element.DataContext = model;
            element.GetDataContext().ShouldBe(model);

            var shape = new Rectangle();
            shape.GetDataContext().ShouldBe(null);
        }
        public void Initialize(Placeholder control1, Placeholder control2)
        {
            control1.Loaded += delegate
                                   {
                                       loaded1++;
                                       control1.Text = string.Format("A. Loaded:{0}", loaded1);
                                   };

            control2.Loaded += delegate
                                    {
                                        loaded2++;
                                        control2.Text = string.Format("B. Loaded:{0}", loaded2);
                                    };
        }
        public void ShouldSetPosition()
        {
            var element = new Placeholder();
            var canvas = new Canvas();
            canvas.Children.Add(element);

            canvas.GetChildPosition(element).ShouldBe(new Point(0,0));

            canvas.SetPosition(element, 10, 5);
            canvas.GetChildPosition(element).ShouldBe(new Point(10, 5));

            canvas.SetPosition(element, new Point(20, 40));
            canvas.GetChildPosition(element).ShouldBe(new Point(20, 40));
        }
        public void Initialize(Border control)
        {
            control.Width = 400;
            control.Height = 300;
            control.Background = StyleResources.Colors["Mac.Lavender"] as Brush;
            control.Padding = new Thickness(10);

            widgetGroup = new WidgetGroup{Title = "My Title", Padding = new Thickness(5)};
            control.Child = widgetGroup;

            // Sample content.
            content = new Placeholder();
            Change_DataContext_On_Content(control);
            content.SetBinding(Placeholder.TextProperty, new Binding("Text"));
            widgetGroup.Content = content;
        }
        public void Initialize(Canvas control)
        {
            behavior = new Draggable();
            dragElement = new Placeholder();

            control.Width = 500;
            control.Height = 500;
            control.Background = StyleResources.Colors["Brush.Black.005"] as Brush;
            control.Children.Add(dragElement);

            Behaviors.SetDraggable(dragElement, behavior);

            behavior.IsDraggingChanged += delegate { Debug.WriteLine("!! IsDraggingChanged - IsDragging: " + behavior.IsDragging); };
            behavior.DragStarted += delegate { Debug.WriteLine("!! DragStarted"); };
            behavior.DragStopped += delegate { Debug.WriteLine("!! DragStopped"); };
        }
        public void Initialize(SampleCanvas control)
        {
            control.Background = StyleResources.Colors["Brush.Black.010"] as SolidColorBrush;
            control.Arranger = new StackArranger(control.Children, Orientation.Vertical, null, null);

            child1 = CreateChild("One", Colors.Red);
            child2 = CreateChild("Two", Colors.Green);
            child3 = CreateChild("Three", Colors.Blue);

            if (control.Children.Count == 0)
            {
                control.Children.Add(child1);
                control.Children.Add(child2);
                control.Children.Add(child3);
            }

            Orientation_Vertical(control);
        }
        public void Initialize(Canvas control)
        {
            element = new Placeholder();
            dragBehavior = new Draggable();
            sliderBehavior = new PositionSlider{Duration = 1};

            control.Width = 500;
            control.Height = 500;
            control.Background = StyleResources.Colors["Brush.Black.005"] as Brush;
            control.Children.Add(element);

            control.SetPosition(element, 50, 50);

            Behaviors.SetDraggable(element, dragBehavior);
            Behaviors.SetPositionSlider(element, sliderBehavior);

            sliderBehavior.SlideStarted += delegate { Debug.WriteLine("!! SlideStarted"); };
            sliderBehavior.SlideComplete += delegate { Debug.WriteLine("!! SlideComplete"); };
        }
 public void SizeMode__FillWithMargin(Placeholder control)
 {
 }
 public void SizeMode__Manual(Placeholder control)
 {
 }
 public void SizeMode__Fill(Placeholder control)
 {
 }
 public void Method2(Placeholder control)
 {
     Output.Write("Executed: Method2");
 }
 public void Initialize(Placeholder control)
 {
 }
 public void Show_Three_Placeholders(Placeholder control1, Placeholder control2, Placeholder control3)
 {
     control1.Color = Colors.Red;
     control2.Color = Colors.Green;
     control3.Color = Colors.Blue;
 }
 public void ThrowError(Placeholder control)
 {
     throw new Exception("Sample exception thrown in ViewTest.");
 }
 public void Toggle_CornerRadius(Placeholder control)
 {
     control.CornerRadius = control.CornerRadius.BottomLeft == 0 
         ? new CornerRadius(20) 
         : new CornerRadius(0);
 }
 public void SampleTestRunnerMethod(Placeholder control)
 {
     Control = control;
     InvokeCount++;
     Output.Write(Colors.Orange, "EXECUTED: SampleTestRunnerMethod (Default)");
 }
 public void MyTest3(Placeholder control, RectEdgeFlag edge = RectEdgeFlag.Top)
 {
     Output.Write("Method Invoked - MyTest3", "edge: " + edge);
 }
 public void MyTest5(Placeholder control, bool isCollapsed = true)
 {
     Output.Write("Method Invoked - MyTest5", "isCollased (Bool): " + isCollapsed);
 }
 public void MyTest2(Placeholder control, Visibility visibility, MyEnum myEnum)
 {
     Output.Write("Method Invoked - MyTest2", "Visibility: " + visibility, "MyEnum: " + myEnum);
 }
 public void Set_Text(Placeholder control)
 {
     control.Text = RandomData.LoremIpsum(1, 3);
 }
 public void Toggle_ShowInstanceCount(Placeholder control)
 {
     control.ShowInstanceCount = !control.ShowInstanceCount;
     Debug.WriteLine("ShowInstanceCount: " + control.ShowInstanceCount);
 }
 public void SizeMode__Default_BubbleToParent(Placeholder control)
 {
 }
 public void AnotherTestRunnerMethod(Placeholder control)
 {
     Control = control;
     InvokeCount++;
     Output.Write(Colors.Green, "EXECUTED: AnotherTestRunnerMethod");
 }
 public void MyTest1(Placeholder control, Gender gender)
 {
     Output.Write("Method Invoked - MyTest1", "Gender: " + gender);
 }
 public void Set_DataContext(Placeholder control)
 {
     control.DataContext = new SampleModel {Text = "Sample Text"};
 }