예제 #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="dataContext">
 /// Binds the back button to dataContext.BackCommand, the next button to
 /// dataContext.NextCommand and the finish button to
 /// dataContext.FinishCommand.
 /// </param>
 /// <param name="isLastPage">
 /// If true then the "Next" button will be disabled.
 /// </param>
 public NextBackButtons(SampleCsWizardPanelViewModel dataContext, bool isLastPage)
 {
     Content = new StackLayout
     {
         Padding     = 0,
         Spacing     = SampleCsWizardEtoPanel.Spacing,
         Orientation = Orientation.Horizontal,
         HorizontalContentAlignment = HorizontalAlignment.Right,
         Items =
         {
             new Button
             {
                 Text    = Rhino.UI.LOC.STR("< Back"),
                 Command = dataContext.BackCommand
             },
             new Button
             {
                 Text    = Rhino.UI.LOC.STR("Next >"),
                 Command = dataContext.NextCommand,
                 Enabled = !isLastPage
             },
             new Button
             {
                 Text    = Rhino.UI.LOC.STR("Finish"),
                 Command = dataContext.FinishCommand
             }
         }
     };
 }
예제 #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="documentRuntimeSerialNumber">
        /// RhinoDoc.RuntimeSerialNumber associated with this MainPanel instance.
        /// </param>
        public MainPanel(uint documentRuntimeSerialNumber)
        {
            // Padding around the main container, child panels should use a padding
            // of 0
            Padding = 6;
            // ViewModel associated with a specific RhinoDoc.RuntimeSerialNumber
            var view = new SampleCsWizardPanelViewModel(documentRuntimeSerialNumber);

            // Set this panels DataContext, Page... panels will inherit this
            // DeviceContext
            DataContext = view;
            // Bind this panel's content to the view model, the Next and Back
            // buttons will set this property.
            this.Bind(c => c.Content, view, m => m.Content);
        }
예제 #3
0
 public EtoPanel2(SampleCsWizardPanelViewModel dataContext) : base(dataContext)
 {
     DataContext = dataContext;
     InitializeComponent();
 }
 protected SampleCsWizardEtoPanel(SampleCsWizardPanelViewModel dataContext)
 {
     ViewModel = dataContext;
 }