Beispiel #1
0
        static void ConfigureConventions()
        {
            ConventionManager.AddElementConvention <TransitioningContentControl>(View.ModelProperty, "DataContext", null);
            ConventionManager.AddElementConvention <BusyIndicator>(BusyIndicator.IsBusyProperty, "IsBusy", null);

            var original = ViewLocator.LocateForModelType;

            ViewLocator.LocateForModelType = (t, v, c) => { return(StudioViewLocator.LocateForModelType(t, v, c, original)); };

            MessageBinder.SpecialValues["$selecteditems"] = context => {
                ListBox listBox;

                if (context.Source is ListBox)
                {
                    listBox = (ListBox)context.Source;
                }
                else
                {
                    var viewAware  = (ViewAware)context.Source.Tag;
                    var parentView = (FrameworkElement)viewAware.GetView();
                    listBox = (ListBox)parentView.FindName("DocumentPageContainer");
                }

                return(listBox.SelectedItems);
            };
        }
Beispiel #2
0
        static void ConfigureConventions()
        {
            ConventionManager.AddElementConvention <TransitioningContentControl>(View.ModelProperty, "DataContext", null);
            ConventionManager.AddElementConvention <BusyIndicator>(BusyIndicator.IsBusyProperty, "IsBusy", null);

            var original = ViewLocator.LocateForModelType;

            ViewLocator.LocateForModelType = (t, v, c) => { return(StudioViewLocator.LocateForModelType(t, v, c, original)); };
        }