Example #1
0
        private void bmiCadastroPessoaClick()
        {
            BaseLayout objParent = this.Parent as BaseLayout;
            BaseBody   baseBody  = null;

            foreach (object item in objParent.Children)
            {
                Type type = item.GetType();
                if (type.Name.Equals("BaseBody"))
                {
                    baseBody = item as BaseBody;
                    baseBody.Children.Clear();

                    CadastroPessoaView cpv = new CadastroPessoaView();
                    Grid.SetColumn(cpv, 1);
                    baseBody.Children.Add(cpv);
                    break;
                }
            }
        }
Example #2
0
        public void addChildren(ref BaseBody body, int?intX = null, int?intY = null)
        {
            try
            {
                if (!intX.Equals(null))
                {
                    Grid.SetColumn(body, Convert.ToInt32(intX));
                }
                if (!intY.Equals(null))
                {
                    Grid.SetRow(body, Convert.ToInt32(intY));
                }

                this.Children.Add(body);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #3
0
 public void changeBody(ref BaseBody body)
 {
     this.Children.Remove(this.FindName("BaseBodyGrid") as UIElement);
     this.addChildren(ref body, null, 1);
 }