Hi,
I'm pretty new to XAML, and my first task in a new job is to untangle a particularly malodorous collection of spaghetti code. Learning XAML at the same time as untangling this horror-show is proving somewhat beyond me, so my apologies for the homework-level questions I'm asking, these days.
Anyway, I have the following XAML code:
...
Hi all. I have a WPF application that has a variable "x" which is an instance of a class from a custom C# assembly called "MyClasses.dll". This variable "x" has a method "LaunchForm" that launches a Windows Form "Form1" from another assembly "MyForms.dll". The form is launched as a dialog and shown in the screen but the current Windows X...
Hello,
I am new to WPF, and I want to develop an application for Theater seating in WPF- c#.net.
I did some research but i am lost as i do not know how each seat's data (sold or not, price, in which row) should be eventually bound to field in a table in SQL Express.
Should i be using ObservableCollection to populate the contents of a Dat...
I Want My ComboBox to Behave like The standard ListBox When my data is grouped ListCollectionView and an Expander.
I've Noticed that when I use the ListBox I can Move between the item groups and open\close the expandrs,
but when I try to switch the ListBox to ComboBox, I get 'trapped' in the group i'm in - While using only the keyboard....
Hello!
I am validating a class with DataAnnotations utils.
I have a class that has a Title property and an Item property.
I want to apply a RequiredAttribute to the Title property but it should be invalid only if the Item property is null; if the Item property is set with an object, the Title is not required.
In short words, I want th...
My GUI desktop-based WPF 4.0 (C# .Net 4.0) program works with SQL Server database. Each time when I run my application it creates connection to SQL Server via ADO.NET Entity Framework and if SQL Server is not reachable it throws exception and shows MessageBox with notification.
Now I want that after user read this message application wi...
Hi,
Im working with a simple mediaplayer based on this msdn example where the user can control volume, playback speed (SpeedRatio) and seek (position) using 3 sliders.
Everything works correctly when I play .mp3 files, but as soon as I play an .m4a file the song playback speed, controlled by the MediaElement.SpeedRatio, is ignored. Vol...
I just want to add a new row, I have my datasource in objects in which I need to do some processing. i need something like below for wpf datagrid...
DataRow row = dataTable.NewRow();
foreach (NavItem item in record.Items)
{
row[item.FieldNo.ToString()] = item.RecordValue;
}
dataTable.Rows.Add(row);
...
I have a control that i want to be visible only if atleast one of a series of properties return true. I was about to implement my own BooleanOrToVisibilityMultiConverter, but it feels like there must be a better (and completely obvious) way to do this.
Please enlighten me!
...
I have a seemingly simple task. Imagine a point, a visual tree and some Visual (point is within Visual). I want to use advanced hit-testing to get my hands on the first "leaf" Visual that is "behind" my own Visual. I have used VisualTreeHelper and its fancy hit-test methods but could not get the results I wanted.
...
Hello,
I have a DataGrid with ONE column. The ItemsPanelTemplate of the DataGrid is in a WrapPanel so the rows are aligned horizontally. Each Cell of the "Row" has the same width, is it possible that every string in the cell takes only the space it needs so I have cells with a short/long width?
...
i have a main control in wpf.
and many controls placed in main control.
when mouse moves over main control i want to find
over which control in main control mouse is placed.
...
Hello,
I wanted to ask if anyone knows how to map gradient brush on complex objects in WPF 3D. The result should look similar to 3D images in matlab (3D function for example). Lets say you have some 3-dimensional data you wish to visualize and you want to diferentiate certain levels of values by color.
...
I use a custom numericUpDown control in my WPF application which works fine in my local development environment. However when i deploy my application the control looks strange, to be more specific, all the elements within the control seem to be in place but without the styles. What could be the reason for this?
...
I'm trying to get the pixel data from a WPF BitmapSource object. As I understand, this can be accomplished by calling its CopyPixels method. This method needs a stride parameter, which I don't know how to obtain. As far as I know, stride is value that's used when stepping in the array during reading or copying. What would be an appropria...
Hello all,
I'm currently taking a good look at the excellent toolkit from Laurent and I have the following question.
From Blend 4, I have added an EventTrigger for the Loaded event, in my ViewModel I have the following:
public RelayCommand rcAutoGeneratingColumn { get; private set; }
In the constructor I have:
rcAutoGeneratingColum...
How do I find the end position of the Caret in a WPF textbox so I can`t move right anymore with the caret?
...
Hello,
this code underlines all Text in the Textbox, can I underline only specific Text?
Brush brush = Brushes.Blue;
Pen pen = new Pen(brush,2);
TextBox tb1 = new TextBox();
tb1.AcceptsReturn = true;
tb1.Text = "This is a very long Text not?";
TextDecoration te...
can I somehow stop this behaviour?
...
I'm looking for a winforms or wpf control that can do both spelling and grammar checking in english and also do red & green squiggly underlines, similar to MS Word.
So far, all I've been able to find are spell-checker controls. I'd be open to good spell checking and grammar checking libraries as well - if you can recommend an integrati...