Exemplo n.º 1
0
        private void ReBindTranStatusTxt()
        {
            Binding myBinding = new Binding("Status");

            myBinding.Source = SalesVM.TransactionData;
            ((FrameworkElement)SalesPad.FindName("TransStatusTxt")).SetBinding(TextBlock.TextProperty, myBinding);
        }
Exemplo n.º 2
0
        private void ReBindItemEditor()
        {
            Binding myBinding = new Binding("SelectedItem");

            myBinding.Source = SalesView.SalesLst;
            myBinding.Mode   = BindingMode.OneWay;

            ((FrameworkElement)SalesPad.FindName("ItemEditor")).SetBinding(ContentControl.ContentProperty, myBinding);
        }
Exemplo n.º 3
0
        private void ReBindTranStatusTxt()
        {
            Binding myBinding = new Binding("Status");

            myBinding.Source = SalesVM.Instance.TransactionData;
            if (SalesPad != null)
            {
                var frameworkElement = (FrameworkElement)SalesPad.FindName("TransStatusTxt");
                if (frameworkElement != null)
                {
                    if (TextBlock.TextProperty != null)
                    {
                        frameworkElement.SetBinding(TextBlock.TextProperty, myBinding);
                    }
                }
            }
        }
Exemplo n.º 4
0
        private void ReBindItemEditor()
        {
            try
            {
                ReBindTranStatusTxt();
                Binding myBinding = new Binding("SelectedItem");
                myBinding.Source = SalesView.SalesLst;
                myBinding.Mode   = BindingMode.OneWay;

                if (ContentProperty != null)
                {
                    ((FrameworkElement)SalesPad.FindName("ItemEditor")).SetBinding(ContentProperty, myBinding);
                }
            }
            catch (Exception ex)
            {
                Logger.Log(LoggingLevel.Error, GetCurrentMethodClass.GetCurrentMethod() + ": --- :" + ex.Message + ex.StackTrace);
                throw ex;
            }
        }