void OpenFromLabel(Label ctrl)
        {
            var eResults = VisualUtils.GetByUid(this, "eResults") as ItemsControl;
            int idx      = VisualUtils.IndexOfControlInItemsControl(eResults, ctrl);

            if (idx >= 0)
            {
                VM.OpenRequested(idx);
            }
        }
Example #2
0
        public SubjectView()
        {
            InitializeComponent();

            DataContextChanged += (s, e) =>
            {
                if (VM == null)
                {
                    return;
                }
                VM.GetMainControl = () =>
                {
                    return(VisualUtils.GetByUid(this, "eFocusBar") as Button);
                };
            };
        }
Example #3
0
        public ExtBoxView()
        {
            InitializeComponent();

            DataContextChanged += (s, e) =>
            {
                if (VM == null)
                {
                    return;
                }
                VM.GetMainControl = () =>
                {
                    return(VisualUtils.GetByUid(this, "eTitle") as TextBox);
                };
            };
        }
        public PersonSearchView()
        {
            InitializeComponent();

            DataContextChanged += (s, e) =>
            {
                if (VM == null)
                {
                    return;
                }
                VM.GetMainControl = () =>
                {
                    return(VisualUtils.GetByUid(this, "eTerm") as TextBox);
                };
                VM.GetPreResultsControl = () =>
                {
                    return(VisualUtils.GetByUid(this, "eSearch") as Button);
                };
            };
        }
Example #5
0
        public TodayView()
        {
            InitializeComponent();

            DataContextChanged += (s, e) =>
            {
                if (VM == null)
                {
                    return;
                }
                VM.GetMainControl = () =>
                {
                    var chunkView = ChunkList.ItemContainerGenerator.ContainerFromIndex(0);
                    if (chunkView == null)
                    {
                        return(null);
                    }
                    var chunkTitle = VisualUtils.GetByUid(chunkView, "eChunkTitle") as TextBox;
                    return(chunkTitle);
                };
            };
        }
Example #6
0
        void FocusNotes()
        {
            var ctrl = VisualUtils.GetByUid(this, "eNotes") as RichTextView;

            VisualUtils.DelayThen(20, () => ctrl?.FocusMainControl());
        }
Example #7
0
        void FocusDate()
        {
            var ctrl = VisualUtils.GetByUid(this, "eDate") as DateView;

            VisualUtils.DelayThen(20, () => ctrl?.FocusMainControl());
        }