예제 #1
0
파일: Common.cs 프로젝트: rondoo/framework
 static void TaskSetAutomationName(FrameworkElement fe, string route, PropertyRoute context)
 {
     if (fe.NotSet(AutomationProperties.NameProperty))
     {
         AutomationProperties.SetName(fe, context?.ToString() ?? "");
     }
 }
예제 #2
0
파일: Common.cs 프로젝트: rondoo/framework
 static void TaskSetCollaspeIfNull(FrameworkElement fe, string route, PropertyRoute context)
 {
     if (GetCollapseIfNull(fe) && fe.NotSet(UIElement.VisibilityProperty))
     {
         Binding b = new Binding(route)
         {
             Mode = BindingMode.OneWay,
             Converter = Converters.NullToVisibility,
         };
         
         fe.SetBinding(FrameworkElement.VisibilityProperty, b);
     }
 }
예제 #3
0
파일: Common.cs 프로젝트: rondoo/framework
        public static void TaskSetLabelText(FrameworkElement fe, string route, PropertyRoute context)
        {
            DependencyProperty labelText = LabelPropertySelector.TryGetValue(fe.GetType());

            if (labelText != null && fe.NotSet(labelText))
            {
                fe.SetValue(labelText, context.PropertyInfo.NiceName());
            }
        }
예제 #4
0
파일: Common.cs 프로젝트: rondoo/framework
        public static void TaskSetIsReadonly(FrameworkElement fe, string route, PropertyRoute context)
        {
            bool isReadOnly = context.PropertyRouteType == PropertyRouteType.FieldOrProperty && context.PropertyInfo.IsReadOnly();

            if (isReadOnly && fe.NotSet(Common.IsReadOnlyProperty) && (fe is ValueLine || fe is EntityLine || fe is EntityCombo || fe is TextArea))
            {
                Common.SetIsReadOnly(fe, isReadOnly);
            }
        }
예제 #5
0
파일: Common.cs 프로젝트: rondoo/framework
        public static void TaskSetTypeProperty(FrameworkElement fe, string route, PropertyRoute context)
        {
            DependencyProperty typeProperty = TypePropertySelector.TryGetValue(fe.GetType());

            if (typeProperty != null && fe.NotSet(typeProperty))
            {
                fe.SetValue(typeProperty, context.Type);
            }
        }