예제 #1
0
        private void ChangeBtn(BtnType btnType)
        {
            Image btnIcon = WPFHelper.GetVisualChild <Image>(Btn);

            switch (btnType)
            {
            case BtnType.BTN_CANCEL:
                Btn.Click -= BtnSearch_OnClick;
                Btn.Click += BtnCancel_OnClick;
                BitmapImage closeIcon = new BitmapImage(new Uri("close.png", UriKind.Relative));
                btnIcon.Source     = closeIcon;
                TbxInput.IsEnabled = false;
                break;

            case BtnType.BTN_SEARCH:
                Btn.Click -= BtnCancel_OnClick;
                Btn.Click += BtnSearch_OnClick;
                BitmapImage searchIcon = new BitmapImage(new Uri("search.png", UriKind.Relative));
                btnIcon.Source     = searchIcon;
                TbxInput.IsEnabled = true;
                break;

            default:
                break;
            }
        }
예제 #2
0
 private void ValueOnSizeChanged(object sender, SizeChangedEventArgs sizeChangedEventArgs)
 {
     if (Data != null)
     {
         _itemsPanel = WPFHelper.GetVisualChild <Panel>(WPFHelper.GetVisualChild <ItemsPresenter>(Parent));
         Data.ReDraw();
     }
 }