Пример #1
0
 static void TaskSetAutomationName(FrameworkElement fe, string route, PropertyRoute context)
 {
     if (fe.NotSet(AutomationProperties.NameProperty))
     {
         AutomationProperties.SetName(fe, context?.ToString() ?? "");
     }
 }
Пример #2
0
        public static DetailGridProxy DetailGrid(this ILineContainer <OrderEntity> container)
        {
            PropertyRoute route = container.GetRoute((OrderEntity o) => o.Details);

            var grid = container.Element.Element(TreeScope.Descendants, a => a.Current.ClassName == "ImmediateGrid" && a.Current.Name == route.ToString());

            return(new DetailGridProxy(grid));
        }//DetailGrid
Пример #3
0
        public static EntityRepeaterProxy EntityRepeater(this ILineContainer container, PropertyRoute route, TreeScope scope = TreeScope.Descendants)
        {
            var entityRepeater = container.Element.Element(scope, a => a.Current.ClassName == "EntityRepeater" && a.Current.Name == route.ToString());

            return(new EntityRepeaterProxy(entityRepeater, route));
        }
Пример #4
0
        public static ILineContainer <C> SubContainer <T, C>(this ILineContainer <T> container, Expression <Func <T, C> > property, TreeScope scope = TreeScope.Descendants)
            where T : ModifiableEntity
            where C : ModifiableEntity
        {
            PropertyRoute route = property.Body.NodeType != ExpressionType.Convert ? container.GetRoute(property) :
                                  container.GetRoute(Expression.Lambda <Func <T, IEntity> >(((UnaryExpression)property.Body).Operand, property.Parameters));

            string str = route.PropertyRouteType == PropertyRouteType.LiteEntity ? route.Parent.ToString() : route.ToString();

            var subContainer = container.Element.Element(scope, a => a.Current.Name == str);

            return(new LineContainer <C> {
                Element = subContainer, PreviousRoute = typeof(C).IsEmbeddedEntity() ? route : null
            });
        }
Пример #5
0
        public static ValueLineProxy ValueLine(this ILineContainer container, PropertyRoute route, TreeScope scope = TreeScope.Descendants)
        {
            var valueLine = container.Element.Element(scope, a => (a.Current.ClassName == "ValueLine" || a.Current.ClassName == "TextArea") && a.Current.Name == route.ToString());

            return(new ValueLineProxy(valueLine, route));
        }