Example #1
0
        public void ScrollToBottom()
        {
            ScrollViewer svLvLog = VisualHelper.GetChildDependencyObjectFromVisualTree(lvLog, typeof(ScrollViewer)) as ScrollViewer;

            if (null != svLvLog)
            {
                svLvLog.ScrollToEnd();
            }
            //   int numOfEntries = lvLog.Items.Count;
            //if (numOfEntries > 0)
            //{
            //	lvLog.ScrollIntoView(lvLog.Items[numOfEntries - 1]);
            //}
        }
Example #2
0
        private void TbTviStartEdit()
        {
            FileContainer fc = tviSelected?.DataContext as FileContainer;

            if (fc != null && fc.FileType == FileType.Directory || fc.FileType == FileType.RegularFile)
            {
                TextBox tb = (TextBox)VisualHelper.GetChildDependencyObjectFromVisualTree(tviSelected, typeof(TextBox));
                if (tb != null)
                {
                    tbTviTextBackup    = tb.Text;
                    tb.BorderThickness = new Thickness(1);
                    tb.IsReadOnly      = false;
                    tb.SelectAll();
                    renameStarted = true;
                    tb.Focus();
                }
            }
        }