Ejemplo n.º 1
0
        private void SetDataContent(ConstructItem item)
        {
            if (item == null)
            {
                return;
            }

            ConstructItemInfoPanel infoPanel = new ConstructItemInfoPanel();

            infoPanel.DataContext = item;
            ContentTransition.ChangeContent(infoPanel, PathContentTranstitionType.NO_ANIM);
            //ItemAttrPanel.Visibility = System.Windows.Visibility.Visible;
            //ItemAttrPanel.DataContext = item;

            //if (item.ItemReadOnly)
            //{
            //    this.Name.IsEnabled = false;
            //    this.ItemCode.IsEnabled = false;
            //    this.ItemDefault.IsEnabled = false;
            //    this.ItemRepeat.IsEnabled = false;
            //}
            //else
            {
                //this.Name.IsEnabled = true;
                //this.ItemCode.IsEnabled = true;
                //this.ItemDefault.IsEnabled = true;
                //this.ItemRepeat.IsEnabled = true;
            }
        }
        private void SetDataContent(ConstructItem item)
        {
            if (item == null)
                return;

            ConstructItemInfoPanel infoPanel = new ConstructItemInfoPanel();
            infoPanel.DataContext = item;
            ContentTransition.ChangeContent(infoPanel, PathContentTranstitionType.NO_ANIM);
            //ItemAttrPanel.Visibility = System.Windows.Visibility.Visible;
            //ItemAttrPanel.DataContext = item;

            //if (item.ItemReadOnly)
            //{
            //    this.Name.IsEnabled = false;
            //    this.ItemCode.IsEnabled = false;
            //    this.ItemDefault.IsEnabled = false;
            //    this.ItemRepeat.IsEnabled = false;
            //}
            //else
            {
                //this.Name.IsEnabled = true;
                //this.ItemCode.IsEnabled = true;
                //this.ItemDefault.IsEnabled = true;
                //this.ItemRepeat.IsEnabled = true;
            }
        }