Skip to main content

All Questions

Tagged with
1 vote
1 answer
56 views

WPF TextBox select content on mouse click

For WPF TextBox I need to select all content of it in case of mouse click on it (in "real life" it will be touch on touchpad monitor). For test I created simple project and check the ...
Fedor Yudin's user avatar
0 votes
1 answer
69 views

C# WPF ListView SelectedItem keep value on lost focus

Problem: Losing ListView Item focus and as a consequence reset of SelectedItem property when I try to push button on another panel different from panel with ListView. I need to keep focus (optional) ...
Fedor Yudin's user avatar
0 votes
0 answers
39 views

WPF Textbox : two textboxes, one need keybord focus and other needs selection of text using mouse

In User control,I have two textboxes Textbox1 - readonly Textbox2 - editable and it has focus now with code bellow editableTextbox.CaretIndex = editableTextbox.Text.Length; editableTextbox.Select(0, ...
Hina's user avatar
  • 13
0 votes
1 answer
201 views

Return keyboard focus

I have an application where the main window contains a user control, and inside that user control are items stored in an ItemsControl. Each item can be removed by clicking an 'x' button. The problem I ...
user avatar
2 votes
1 answer
535 views

How to focus on a newly added TabItem of a WPF TabControl?

I'm facing an issue where I need to be able to actually focus a TabItem tab in a TabControl like I would press the TAB key. I know I could use SendKeys.SendWait("{TAB}"); in order to achieve ...
Bruno Bieri's user avatar
  • 10.1k
0 votes
0 answers
184 views

WPF C# - Set focus to the last item of ItemsControl

In my WPF application, I have an items control, which includes text boxes and I also have a button which adds a new item to the items control. And I want that the focus will be set to the new item. I ...
Florian's user avatar
  • 1,071
0 votes
2 answers
208 views

How can I make a Grid that has tab stopping behavior?

I created a simple WPF UserControl that has a Grid as its Content control that reacts to MouseEnter, MouseLeave, and MouseDown events. Basically it is behaving like a button at this point, changing ...
kernelk's user avatar
  • 368
1 vote
1 answer
681 views

Tab-focused button border color and style

I have this button in my User Control: <Button x:Name="OkButton" Grid.Column="1" Command="{Binding Confirm}" IsDefault="True" IsEnabled=&...
IssamTP's user avatar
  • 2,430
0 votes
1 answer
59 views

Mark a cell in my datagrid when the program starts

I can easily programmatically mark a cell in my datagrid using the following code: DataGrid1.ScrollIntoView(DataGrid1.Items[Rowindex]); DataGrid1.Focus(); ...
Mario Allw's user avatar
0 votes
1 answer
36 views

Why MainWindow doesn't take the focus from a Popup child

I have a problem when I'm using a Textbox in a Popup, opened from the MainWindow: if the MainWindow doesn't have the focus after the Popup has been opened, I'm not able to write something in the ...
Valentin Marie's user avatar
0 votes
0 answers
26 views

How can I prevent WPF Viewbox component from "stealing" focus from main window? [duplicate]

I currently have a little WPF window that contains only a Viewbox, which itself contains a Calendar component (so that resizing the window resizes the calendar to match). The XAML for this is: <...
DucksGoMooful's user avatar
0 votes
1 answer
154 views

wpf how to get program focus form windows

i made program it work in background, i want this program only work on program i select it example : i created Auto clicker and i want to use this program just in games if the user go to any other ...
ATM's user avatar
  • 40
-1 votes
1 answer
51 views

Accessing rows not in focus in WPF DataGrid

I'm setting the style of unselected rows with Extended selection mode set up for my datagrid. This works fine for rows that are on the screen, but as you scroll up or down, the rows not in focus are ...
Jesse Roper's user avatar
  • 1,289
0 votes
1 answer
498 views

WPF application raises Activated event, but the application is not shown and not in focus

I have two applications. One of them is 3rd party, which sends messages to my WPF app. There are two types of messages: "hide" and "show". On "hide", my app hides itself ...
Ksice's user avatar
  • 3,317
0 votes
1 answer
187 views

IsKeyboardFocusWithin Popup

I use the IsKeyboardFocusWithin value to set IsSelected to ListViewItem in my layout. So far it worked fine, until I discovered, that the Popup within my item doesn't pass IsKeyboardFocus value to its ...
L1oN's user avatar
  • 25

15 30 50 per page
1
2 3 4 5
46