Ejemplo n.º 1
0
 public void SetFillOutState(FormItemState state)
 {
     FillOutState = state;
     if ((Style)App.resources["ListPicker" + state.ToString()] != null)
     {
         this.Style = (Style)App.resources["ListPicker" + state.ToString()];
     }
     foreach (TextBlock tb in AllChildren)
     {
         if ((Style)App.resources["List" + state.ToString()] != null)
         {
             Style style = (Style)App.resources["List" + state.ToString()];
             tb.Style = style;
             foreach (Setter setter in style.Setters)
             {
                 if (setter.Property == FrameworkElement.HeightProperty)
                 {
                     tb.Height = (double)setter.Value;
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
        public FormItem setStateOfFormItem(String id, FormItemState state)
        {
            FormItem ItemExist = null;

            foreach (FormItem item in FormItemList)
            {
                if (item.ID == id)
                {
                    ItemExist  = item;
                    item.State = state.ToString();
                    checkMyState();
                    break;
                }
            }
            return(ItemExist);
        }