コード例 #1
0
 private void CollectionPropertyEditor_OpenCollectionEditor(object sender,
                                                            CollectionPropertyEditor.OpenCollectionEditorEventArgs e)
 {
     this.NavigationService?.Navigate(new CollectionEditorPage(
                                          PropertyPath.Concat(e.PropertyName.Yield()), e.ItemsSource, e.ItemsSourceType, e.NewItemTypes
                                          ));
 }
コード例 #2
0
        public IValueAccessorBehavior <TValue> CreateMappedAccessor <TValue>(
            Expression <Func <TSourceObject, TValue> > valueSelector
            )
        {
            var path = PropertyPath.Concat(
                _sourceObjectPath,
                PropertyPath.CreateWithDefaultValue(valueSelector)
                );

            return(new MappedValueAccessorBehavior <TOwnerVM, TValue>(path));
        }
コード例 #3
0
        public void Concat()
        {
            var path1 = PropertyPath.Create <Employee, Address>(p => p.Address);
            var path2 = PropertyPath.Create <Address, string>(a => a.City);

            var path3 = PropertyPath.Concat(path1, path2);

            TestAddressPath(path3);

            var emptyEmployeePath = PropertyPath.Empty <Employee>();
            var emptyStringPath   = PropertyPath.Create <string, string>(s => s);

            var path4 = PropertyPath.Concat(emptyEmployeePath, path3);
            var path5 = PropertyPath.Concat(path3, emptyStringPath);

            TestAddressPath(path4);
            TestAddressPath(path5);
        }