I have wpf UserControl containing a combobox and a textbox in a row. Currently the only way to move between the components is to tab between them, but I would like to also be able to switch from the combobox to the textbox using the left and right arrow keys.
It is not as easy as just slapping an eventhandler on the keyup event.
void C...
Hi,
Im trying to change the default highlight colour of a tab item in a tab control in WPF.
In the image the highlight colour is orange, I just want to know if there is away to change it to another solid colour?
Here is my XAML which declares the TabControl and 2 TabItems
<TabControl>
<TabControl.Background>
...
How will i disable Print Screen whil my WPF application is running...?
...
Which one is the best third party libary to convert XPS to PDF and XPS to DOC.
...
I have a datagrid and it contains the list of files from the folder. I want to display the default window files right click options in right click on the filename.
That is when ever i right click the filename in the datagrid, a default windows right click pop up should appear.
Can anyone help me to sort this out. The project is in C#.
...
i need this set RED color. how to do it?
DataTable dtSet = new DataTable();
string sql = @"requevst";
using (MySqlConnection connection = ConnectToDataBase.GetConnection())
{
...
int count = adapter.Fill(dtSet);
}
double totalPrice = 0;
foreach (DataRow row in dtSet.Rows)
{
to...
Ok this might be simple or just not possible. Probably it's something that is frowned upon.
Let's say I have a combobox and a button beside it. I choose a item from the combobox and press the button.
In my button handler I guess I'm supposed to fetch combobox.selectedValue to get the item ( is there a better way).
Let's say I don't ha...
In a WPF DataGrid the F2 key is used to edit current cell. The requirements in my software project says that F2 should do something else. I have added a keybinding, but it only works when keyboardfocus is not in the DataGrid.
Can I disable or remove the DataGrid's keybinding to the F2 key?
...
Hi,
Objects whose Properties are observed for changes must implement the System.ComponentModel.INotifyPropertyChanged event to alert their WPF-element observers that a change has occurred.
If I have a Visual Basic Module whose Properties I wish to have observed by a WPF element, how should I go about routing the Properties of that Modu...
Hey everyone!
For the life of me I can not get my Validation.ErrorTemplate showing for my custom Textbox control. I tried adding an AdornerDecorator out of desperation because I read that helps sometimes. If anyone can help point me in the right direction, that would be amazing.
I uploaded a sample project if someone would rather see...
I have a WPF application with form that has a textbox named "txtStatusWindow". I also have a vb.net class handed to me by a co-worker that needs to be called and executed by the code in my application code-behind. My co-worker insists that I will need to use common .net events to update the textbox on my form.
The separate vb.net class:...
Hi there
I have a problem with my BackgroundWorker placed in a UserControl.
My WPF application has a navigation on the left and each entry loads its own UserControl where the user can generate a PDF file.
Because the creation of the PDF takes some time I've implemented a BackgroundWorker which does the job and additionally I disable s...
Hi
I have a wpf form which contains a datagrid. I did put a button on my form to "Refresh" the datagrid. Steps I'm trying to get it to refresh:
I update the viewsource from my db:
SupportCaseViewSource.Source = SupportCaseManager.GetAllSupportCases();
I refresh the datagrid items:
SupportCaseDataGrid.Items.Refresh();
But nothing ha...
There seems to be a bit of an issue with two grids containing elements specified in a certain way, and the SharedSizeGroup.
This question is in response to an earlier question from user D.H. I attempted to answer. Forgive the length, but it helps to demonstrate the problem visually.
His original question asked why two grids with a Sh...
This code:
<StackPanel Orientation="Horizontal">
<RichTextBox />
<Button Content="Dialog" />
</StackPanel>
shows the button somewhere on the left side of the StackPanel ONTO the RichTextBox, WHY?
edit: Oh I just saw its a width problem. The RTB has nearly no width and the button is righth...
How do I route the KeyUpEvent event for a UIElement to a TextBox in WPF?
For example with the following objects:
<Rectangle x:Name="rectangleWPF"></Rectangle>
<TextBox x:Name="textBoxWPF"></TextBox>
If an 'A' is pressed on rectangleWPF then an 'A' must be inserted into textBoxWPF. Then if a backspace is pressed on rectangleWPF, text...
My desktop-based WPF-application (4.0) works with DB and in order to this it should establish a connection with SQL Server on application's startup. Of course, this operation takes some time and user have to wait some seconds (3-5) while .Net Framework start and connect to SQL Server.
As appropriate in such kind of cases I decided to us...
Hi all!
I have WPF application that performs some calculations in BackgroundWorker. The problem is that when I try to update property (which calls NotifyPropertyChanged in setter) in RunWorkerCompleted event handler I get InvalidOperationException - The calling thread cannot access this object because a different thread owns it.
This M...
Printing any visual is easy.
Printing one that is larger than a single page is hard.
I'm stuck. The docs are scarce and I've gotten as far as I can.
I'm wondering if anybody has a class which extends DocumentPaginator that can take any visual (or even a UIElement) and split it across multiple pages. I attempted to create one, but I ...
For the experienced WPFers out there, how re-usable are WPF, Silverlight and Silverlight OOB applications and components? How much overlap is there?
For example, could I write one application and easily deploy it in the three aforementioned ways?
Ideally, I want to write as little code as possible and have the flexibility of deployin...