Exemplo n.º 1
0
 protected override void OnDetachingFrom(SampleView bindable)
 {
     dataGrid   = null;
     pdfImage   = null;
     excelImage = null;
     base.OnDetachingFrom(bindable);
 }
Exemplo n.º 2
0
 /// <summary>
 /// You can override this method while View was detached from window
 /// </summary>
 /// <param name="bindAble">SampleView type of bindAble parameter</param>
 protected override void OnDetachingFrom(SampleView bindAble)
 {
     this.dataGrid   = null;
     this.pdfImage   = null;
     this.excelImage = null;
     base.OnDetachingFrom(bindAble);
 }
Exemplo n.º 3
0
 protected override void OnDetachingFrom(BindableObject bindable)
 {
     transitionType.SelectedIndexChanged -= OnSelectionChanged;
     pullToRefresh.Refreshing            -= PullToRefresh_Refreshing;
     pullToRefresh = null;
     datagrid      = null;
     viewModel     = null;
     base.OnDetachingFrom(bindable);
 }
Exemplo n.º 4
0
 protected override void OnDetachingFrom(SampleView bindable)
 {
     optionsList.SelectedIndexChanged -= OnFilterOptionsChanged;
     columnsList.SelectedIndexChanged -= OnColumnsSelectionChanged;
     filterText.TextChanged           -= OnFilterTextChanged;
     dataGrid    = null;
     optionsList = null;
     columnsList = null;
     filterText  = null;
     base.OnDetachingFrom(bindable);
 }
Exemplo n.º 5
0
 /// <summary>
 /// You can override this method while View was detached from window
 /// </summary>
 /// <param name="bindAble">SampleView type of bindAble parameter</param>
 protected override void OnDetachingFrom(SampleView bindAble)
 {
     this.optionsList.SelectedIndexChanged -= this.OnFilterOptionsChanged;
     this.columnsList.SelectedIndexChanged -= this.OnColumnsSelectionChanged;
     this.filterText.TextChanged           -= this.OnFilterTextChanged;
     this.dataGrid    = null;
     this.optionsList = null;
     this.columnsList = null;
     this.filterText  = null;
     base.OnDetachingFrom(bindAble);
 }
Exemplo n.º 6
0
 /// <summary>
 /// You can override this method while View was detached from window
 /// </summary>
 /// <param name="bindAble">SampleView type of bindAble parameter</param>
 protected override void OnDetachingFrom(SampleView bindAble)
 {
     this.switch1.Toggled -= this.Switch1_Toggled;
     this.switch2.Toggled -= this.Switch2_Toggled;
     this.switch3.Toggled -= this.Switch3_Toggled;
     this.switch4.Toggled -= this.Switch4_Toggled;
     this.dataGrid         = null;
     this.switch1          = null;
     this.switch2          = null;
     this.switch3          = null;
     this.switch4          = null;
     base.OnDetachingFrom(bindAble);
 }
Exemplo n.º 7
0
 protected override void OnDetachingFrom(SampleView bindable)
 {
     switch1.Toggled -= Switch1_Toggled;
     switch2.Toggled -= Switch2_Toggled;
     switch3.Toggled -= Switch3_Toggled;
     switch4.Toggled -= Switch4_Toggled;
     dataGrid         = null;
     switch1          = null;
     switch2          = null;
     switch3          = null;
     switch4          = null;
     base.OnDetachingFrom(bindable);
 }
Exemplo n.º 8
0
        /// <summary>
        /// You can override this method to subscribe to AssociatedObject events and initialize properties.
        /// </summary>
        /// <param name="bindAble">SampleView type of para named as bindAble</param>
        protected override void OnAttachedTo(SampleView bindAble)
        {
            this.dataGrid = bindAble.FindByName <Syncfusion.SfDataGrid.XForms.SfDataGrid>("dataGrid");
            this.switch1  = bindAble.FindByName <Switch>("switch1");
            this.switch2  = bindAble.FindByName <Switch>("switch2");
            this.switch3  = bindAble.FindByName <Switch>("switch3");
            this.switch4  = bindAble.FindByName <Switch>("switch4");

            this.switch1.Toggled += this.Switch1_Toggled;
            this.switch2.Toggled += this.Switch2_Toggled;
            this.switch3.Toggled += this.Switch3_Toggled;
            this.switch4.Toggled += this.Switch4_Toggled;
            base.OnAttachedTo(bindAble);
        }
        /// <summary>
        /// You can override this method to subscribe to AssociatedObject events and initialize properties.
        /// </summary>
        /// <param name="bindAble">SampleView type parameter as bindAble</param>
        protected override void OnAttachedTo(SampleView bindAble)
        {
            var assembly = Assembly.GetAssembly(Application.Current.GetType());

            this.dataGrid   = bindAble.FindByName <Syncfusion.SfDataGrid.XForms.SfDataGrid>("dataGrid");
            this.excelImage = bindAble.FindByName <Xamarin.Forms.Image>("excelImage");
            this.pdfImage   = bindAble.FindByName <Xamarin.Forms.Image>("pdfImage");
            this.excelImage.GestureRecognizers.Add(new TapGestureRecognizer()
            {
                Command = new Command(this.ExportToExcel)
            });
            this.pdfImage.GestureRecognizers.Add(new TapGestureRecognizer()
            {
                Command = new Command(this.ExportToPdf)
            });

            this.pdfExport   = bindAble.FindByName <StackLayout>("PdfStack");
            this.excelExport = bindAble.FindByName <StackLayout>("ExcelStack");
            this.excelExport.GestureRecognizers.Add(new TapGestureRecognizer()
            {
                Command = new Command(this.ExportToExcel)
            });
            this.pdfExport.GestureRecognizers.Add(new TapGestureRecognizer()
            {
                Command = new Command(this.ExportToPdf)
            });
#if COMMONSB
            this.pdfImage.Source   = ImageSource.FromResource("SampleBrowser.Icons.DataGrid.PdfExport.png", assembly);
            this.excelImage.Source = ImageSource.FromResource("SampleBrowser.Icons.DataGrid.ExcelExport.png", assembly);
#else
            this.pdfImage.Source   = ImageSource.FromResource("SampleBrowser.SfDataGrid.Icons.DataGrid.PdfExport.png", assembly);
            this.excelImage.Source = ImageSource.FromResource("SampleBrowser.SfDataGrid.Icons.DataGrid.ExcelExport.png", assembly);
#endif
            this.excelImage.Margin    = new Thickness(0, 0, 10, 0);
            this.exportToPdf          = bindAble.FindByName <Label>("exportToPdf");
            this.exportToPdf.Focused += this.ExportToPdf_Clicked;
            //// exportToPdf.Clicked += ExportToPdf_Clicked;

            this.exportToExcel          = bindAble.FindByName <Label>("exportToExcel");
            this.exportToExcel.Focused += this.ExportToExcel_Clicked;
            //// exportToExcel.Clicked += ExportToExcel_Clicked;

            base.OnAttachedTo(bindAble);
        }
Exemplo n.º 10
0
        protected override void OnAttachedTo(SampleView bindable)
        {
            viewModel = new GettingStartedViewModel();
            bindable.BindingContext = viewModel;
            pullToRefresh           = bindable.FindByName <Syncfusion.SfPullToRefresh.XForms.SfPullToRefresh>("pullToRefresh");
            datagrid             = bindable.FindByName <Syncfusion.SfDataGrid.XForms.SfDataGrid>("dataGrid");
            datagrid.ItemsSource = viewModel.OrdersInfo;
            transitionType       = bindable.FindByName <PickerExt>("transitionType");
            datagrid.ItemsSource = viewModel.OrdersInfo;
            transitionType.Items.Add("SlideOnTop");
            transitionType.Items.Add("Push");
            transitionType.SelectedIndex         = 0;
            transitionType.SelectedIndexChanged += OnSelectionChanged;
            pullToRefresh.Refreshing            += PullToRefresh_Refreshing;

            if (Device.RuntimePlatform == Device.UWP)
            {
                pullToRefresh.ProgressBackgroundColor = Color.FromHex("0065ff");
                pullToRefresh.ProgressStrokeColor     = Color.FromHex("#ffffff");
            }

            base.OnAttachedTo(bindable);
        }
Exemplo n.º 11
0
 protected override void OnAttachedTo(SampleView bindable)
 {
     viewModel = new FilteringViewModel();
     dataGrid  = bindable.FindByName <Syncfusion.SfDataGrid.XForms.SfDataGrid>("dataGrid");
     bindable.BindingContext = viewModel;
     optionsList             = bindable.FindByName <PickerExt>("OptionsList");
     columnsList             = bindable.FindByName <PickerExt>("ColumnsList");
     filterText = bindable.FindByName <SearchBarExt>("filterText");
     optionsList.Items.Add("Equals");
     optionsList.Items.Add("NotEquals");
     optionsList.Items.Add("Contains");
     columnsList.Items.Add("All Columns");
     columnsList.Items.Add("CustomerID");
     columnsList.Items.Add("BookID");
     columnsList.Items.Add("FirstName");
     columnsList.Items.Add("LastName");
     columnsList.Items.Add("BookName");
     columnsList.SelectedIndex         = 0;
     viewModel.filtertextchanged       = OnFilterChanged;
     filterText.TextChanged           += OnFilterTextChanged;
     columnsList.SelectedIndexChanged += OnColumnsSelectionChanged;
     optionsList.SelectedIndexChanged += OnFilterOptionsChanged;
     base.OnAttachedTo(bindable);
 }