Inheritance: System.Windows.Controls.UserControl, IViewFactoryContent
 public void Enable_Buttons(ViewFactoryContent control)
 {
     foreach (PromptResult buttonType in typeof(PromptResult).GetEnumValues())
     {
         Dialog.ButtonBar.Buttons.GetButton(buttonType).IsEnabled = true;
     }
 }
 public void Initialize(ViewFactoryContent control)
 {
     CompositionInitializer.SatisfyImports(this);
     control.Width = 300;
     control.Height = 250;
     control.ViewFactory = ViewModel;
 }
 public void Load_ModelessMessageContent(ViewFactoryContent control)
 {
     if (modelessMessage == null) modelessMessage = new ModelessMessageDialogContentViewModel();
     modelessMessage.Text = RandomData.LoremIpsum(5, 50);
     modelessMessage.Icon.Source = IconImage.SilkError.ToImageSource();
     modelessMessage.Initialize(Dialog);
     Dialog.Show(modelessMessage, result => Output.Write("Callback - OnComplete: " + result));
 }
        public void Initialize(ViewFactoryContent control)
        {
            control.Width = 300;
            control.Height = 200;
            viewFactory = new MockViewFactory();

            Set_ViewFactory(control);
        }
 public void Show(
                     ViewFactoryContent control,
                     PromptButtonConfiguration buttonConfiguration = PromptButtonConfiguration.YesNoCancel,
                     DialogSize sizeMode = DialogSize.Fill)
 {
     Dialog.Show(
                     myContent,
                     result => Output.Write("Callback - OnComplete: " + result),
                     sizeMode: sizeMode,
                     buttonConfiguration: buttonConfiguration);
 }
        public void Initialize(ViewFactoryContent control)
        {
            CompositionInitializer.SatisfyImports(this);
            control.ViewFactory = Dialog;

//            DelayedAction.Invoke(0.6, action: () => Show(control));
//            DelayedAction.Invoke(0.6, action: () => Load_ModelessMessageContent(control));

            Dialog.Showing += delegate { Output.Write(Colors.Green, "!! Showing"); };
            Dialog.Shown += delegate { Output.Write(Colors.Red, "!! Shown"); Output.Break(); };
            Dialog.Hiding += delegate { Output.Write(Colors.Green, "!! Hiding"); };
            Dialog.Hidden += delegate { Output.Write(Colors.Red, "!! Hidden"); Output.Break(); };
        }
 public void TotalPages__Increase(ViewFactoryContent control) { Pager.TotalPages++; }
 public void TotalPages__Reduce(ViewFactoryContent control) { Pager.TotalPages--; }
 public void Change_Content_Height(ViewFactoryContent control)
 {
     myContent.Height = myContent.Height == 200 ? 300 : 200;
 }
 public void Toggle__Thickness(ViewFactoryContent control)
 {
     ViewModel.Thickness = ViewModel.Thickness.Left == 1 ? new Thickness(5) : new Thickness(1);
 }
 public void Toggle__Opacity(ViewFactoryContent control)
 {
     ViewModel.Opacity = ViewModel.Opacity == 1 ? 0.3 : 1;
 }
 public void Toggle__DropShadowOpacity(ViewFactoryContent control)
 {
     Dialog.DropShadowOpacity = Dialog.DropShadowOpacity == 0 ? 0.3 : 0;
 }
 public void Set_ViewFactory(ViewFactoryContent control)
 {
     control.ViewFactory = viewFactory;
 }
 public void Write_Properties(ViewFactoryContent control)
 {
     Output.WriteProperties(Pager);
 }
 public void Toggle__IsEnabled(ViewFactoryContent control) { Pager.IsEnabled = !Pager.IsEnabled; }
 public void Toggle__Margin(ViewFactoryContent control)
 {
     Dialog.Margin = Dialog.Margin.Left == 0 ? new Thickness(20) : new Thickness(0);
 }
 public void Toggle__IsShowing(ViewFactoryContent control)
 {
     Set__Content(control);
     Dialog.IsShowing = !Dialog.IsShowing;
     Output.Write("IsShowing: " + Dialog.IsShowing);
 }
 public void Show(ViewFactoryContent control)
 {
     Dialog.Show(
             myContent,
             result => Output.Write("Callback - OnComplete: " + result));
 }
 public void Toggle__IsLoading(ViewFactoryContent control) { Pager.IsLoading = !Pager.IsLoading; }
 public void Change_Button_Configuration(ViewFactoryContent control, PromptButtonConfiguration configuration = PromptButtonConfiguration.YesNoCancel)
 {
     Dialog.ButtonBar.Buttons.Configuration = configuration;
 }
 public void Initialize(ViewFactoryContent control)
 {
     CompositionInitializer.SatisfyImports(this);
     control.ViewFactory = Pager;
     Pager.CurrentIndexChanged += delegate { Output.Write("!! CurrentIndexChanged: " + Pager.CurrentPage); };
 }
 public void Change__PageCount(ViewFactoryContent control)
 {
     Pager.TotalPages = Pager.TotalPages == 15 ? 100 : 15;
 }
 public void Clear_ViewFactory(ViewFactoryContent control)
 {
     control.ViewFactory = null;
 }
 public void Change__PageButtonCount(ViewFactoryContent control)
 {
     Pager.TotalPageButtons = Pager.TotalPageButtons == 2 ? 5 : 2;
 }
 public void Set__Color(ViewFactoryContent control)
 {
     ViewModel.Color = new SolidColorBrush(Colors.Orange);
 }
 public void CurrentPage__Increase(ViewFactoryContent control) { Pager.CurrentPage++; }
 public void Toggle__IsVisible(ViewFactoryContent control)
 {
     ViewModel.IsVisible = !ViewModel.IsVisible;
 }
 public void CurrentPage__Decrease(ViewFactoryContent control) { Pager.CurrentPage--; }
 public void Toggle__CorderRadius(ViewFactoryContent control)
 {
     ViewModel.CornerRadius = ViewModel.CornerRadius.TopLeft == 0 
                     ? new CornerRadius(15) 
                     : new CornerRadius(0);
 }
 public void Change_Content_Width(ViewFactoryContent control)
 {
     myContent.Width = myContent.Width==500 ? 600 : 500;
 }