示例#1
0
        protected override void OnKeyDown(KeyEventArgs e)
        {
            if (e.Key.Equals(Key.Enter))
            {
                var tb = GetTemplateChild("EditText") as TextBox;

                if (tb != null)
                {
                    SharedText = tb.Text;

                    ItemEditCompleteEventArgs args = new ItemEditCompleteEventArgs(ItemEditCompleteEvent, SharedText);
                    RaiseEvent(args);

                    tb.Text = "";
                }
            }
            else
            {
                base.OnKeyDown(e);
            }
        }
        protected override void OnKeyDown(KeyEventArgs e)
        {
            if (e.Key.Equals(Key.Enter))
            {
                var tb = GetTemplateChild("EditText") as TextBox;

                if (tb != null)
                {
                    SharedText = tb.Text;

                    ItemEditCompleteEventArgs args = new ItemEditCompleteEventArgs(ItemEditCompleteEvent, SharedText);
                    RaiseEvent(args);

                    tb.Text = "";
                }
            }
            else
            {
                base.OnKeyDown(e);
            }
        }
示例#3
0
        void button_Click(object sender, RoutedEventArgs e)
        {
            ItemEditCompleteEventArgs args = new ItemEditCompleteEventArgs(ItemDeleteEvent, SharedText);

            RaiseEvent(args);
        }
 void button_Click(object sender, RoutedEventArgs e)
 {
     ItemEditCompleteEventArgs args = new ItemEditCompleteEventArgs(ItemDeleteEvent, SharedText);
     RaiseEvent(args);
 }