Click here to Skip to main content
15,922,007 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: missing taglistenUriMode="Explicit/Unique" Pin
Pete O'Hanlon16-Dec-08 8:31
mvePete O'Hanlon16-Dec-08 8:31 
QuestionHow to override animation in wpf progress bar in indeterminate state? Pin
oyvindpe15-Dec-08 21:42
oyvindpe15-Dec-08 21:42 
AnswerRe: How to override animation in wpf progress bar in indeterminate state? Pin
Charith Jayasundara16-Dec-08 2:55
Charith Jayasundara16-Dec-08 2:55 
AnswerRe: How to override animation in wpf progress bar in indeterminate state? Pin
oyvindpe16-Dec-08 3:48
oyvindpe16-Dec-08 3:48 
QuestionStroke "erasure by points" action duplication on an InkCanvas. (WPF) Pin
Amit Regmi15-Dec-08 9:59
Amit Regmi15-Dec-08 9:59 
QuestionC# WPF how to find ContextMenu Parent Control? [modified] Pin
me0814-Dec-08 21:17
me0814-Dec-08 21:17 
QuestionMulti Line in WPF C# text box on Shift+Enter only Pin
Emir Gracanin13-Dec-08 8:59
Emir Gracanin13-Dec-08 8:59 
AnswerRe: Multi Line in WPF C# text box on Shift+Enter only Pin
Insincere Dave13-Dec-08 10:53
Insincere Dave13-Dec-08 10:53 
Try using the PreviewKeyDown event. This seemed to work ok.
<Window x:Class="ImTextbox.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="355" Width="498">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="250*" />
            <RowDefinition Height="67*" />
        </Grid.RowDefinitions>
        <ItemsControl x:Name="listbox">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Border BorderBrush="Chartreuse" BorderThickness="2" CornerRadius="5" Margin="2" >
                        <ContentPresenter Content="{Binding}" Margin="4"/>
                    </Border>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
        <TextBox AcceptsReturn="True" x:Name="textbox" Grid.Row="1" Margin="4" />
    </Grid>
</Window>


public partial class Window1 : Window
{
    public Window1()
    {
        InitializeComponent();
        textbox.PreviewKeyDown += new KeyEventHandler(textbox_PreviewKeyDown);
    }

    void textbox_PreviewKeyDown(object sender, KeyEventArgs e)
    {
        if (e.Key == Key.Enter && (e.KeyboardDevice.Modifiers & ModifierKeys.Shift) != ModifierKeys.Shift)
        {
            listbox.Items.Add(textbox.Text);
            textbox.Clear();
            e.Handled = true;
        }
    }
    
}

QuestionHow to set DataSource for DataGridView in WPF [modified] Pin
Czechtim213-Dec-08 6:44
Czechtim213-Dec-08 6:44 
AnswerRe: How to set DataSource for DataGridView in WPF Pin
Mark Salsbery13-Dec-08 9:34
Mark Salsbery13-Dec-08 9:34 
GeneralRe: How to set DataSource for DataGridView in WPF Pin
Czechtim213-Dec-08 11:19
Czechtim213-Dec-08 11:19 
GeneralRe: How to set DataSource for DataGridView in WPF Pin
Mark Salsbery13-Dec-08 17:16
Mark Salsbery13-Dec-08 17:16 
GeneralRe: How to set DataSource for DataGridView in WPF Pin
Czechtim213-Dec-08 22:07
Czechtim213-Dec-08 22:07 
GeneralRe: How to set DataSource for DataGridView in WPF Pin
Mark Salsbery14-Dec-08 9:38
Mark Salsbery14-Dec-08 9:38 
GeneralRe: How to set DataSource for DataGridView in WPF Pin
Czechtim214-Dec-08 11:04
Czechtim214-Dec-08 11:04 
GeneralRe: How to set DataSource for DataGridView in WPF Pin
Mark Salsbery14-Dec-08 12:06
Mark Salsbery14-Dec-08 12:06 
GeneralRe: How to set DataSource for DataGridView in WPF Pin
Czechtim215-Dec-08 2:31
Czechtim215-Dec-08 2:31 
GeneralRe: How to set DataSource for DataGridView in WPF Pin
Mark Salsbery15-Dec-08 10:28
Mark Salsbery15-Dec-08 10:28 
GeneralRe: How to set DataSource for DataGridView in WPF Pin
Czechtim215-Dec-08 10:33
Czechtim215-Dec-08 10:33 
Questionchange menustrip Pin
jogisarge12-Dec-08 5:17
jogisarge12-Dec-08 5:17 
AnswerRe: change menustrip Pin
Mark Salsbery12-Dec-08 7:05
Mark Salsbery12-Dec-08 7:05 
QuestionInstance Error in xaml Pin
Arijit Manna11-Dec-08 23:15
Arijit Manna11-Dec-08 23:15 
AnswerRe: Instance Error in xaml Pin
Pete O'Hanlon12-Dec-08 1:26
mvePete O'Hanlon12-Dec-08 1:26 
AnswerRe: Instance Error in xaml Pin
Mark Salsbery12-Dec-08 7:08
Mark Salsbery12-Dec-08 7:08 
GeneralRe: Instance Error in xaml Pin
Arijit Manna12-Dec-08 18:00
Arijit Manna12-Dec-08 18:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.