I keep getting "Insufficient parameters supplied to the command" exception when running the code below. I have tried several versions of code with the same result. Searching on line has given me hundreds of examples of this exception, but they have all been simply typos or they used another of...
I am not getting this right. I want the values from the following strings;
StdDev_1: 7.10012290660172E-02
StdDev_2: 0.127890201279279
First value in Group 1 should be 7.10012290660172 and in Group 3 I get 2.
Match 1 = 7.10012290660172E-02
Group 1 = 7.10012290660172
Group 2 = E-0
Group 3 = 2...
Here is how I get the incoming data.
Snippetpublic void DataReceived(object sender, SerialDataReceivedEventArgs e)
{
string buffer = string.Empty;
try
{
while ((sender as SerialPort).BytesToRead > 0)
{
buffer += (sender as SerialPort).ReadExisting()...
I added a UI control to display the status (saved or not) of a couple of objects. I used a dictionary so I could have the object name and its status. When the program starts it loads the dictionary and sets the status to "***." Whenever a watched property changes the program saves the instrument...
Fixed. The problem was the "InitializeComponent();" was not being recognized. The fix was to edit the XAML and resave it. Found on SO The name 'InitializeComponent' does not exist in the current context.
I am being told by the error list that MainWindowView does not have a data context. And another error saying it does not have a Show method. It has in the past and I am stumped on how to locate the real issue.
protected override async void OnStartup(StartupEventArgs e)
{...
Thanks, Skydiver,
Hard coding passed the parameter as expected, so I looked at the binding to the parameter. As soon as I try to bind to the text in the run where the port name is, I get null at the command. So it is the binding that is not right, but I don't see anything wrong with it. I am...
Take the DataContext line out of the MainWindow code behind and put it in the startup
protected override async void OnStartup(StartupEventArgs e)
{
await AppHost!.StartAsync();
var startUpForm = AppHost.Services.GetRequiredService<MainWindow>()...
You have the property CustomerSelected bound to the SelectedItem in the databgrid. So in the property just call a method and pass the "object" to it. The object in your case is a GetCustomer model. So everything is there. It is that object you want to edit. When you're done with it you can just...
Second attempt!
I am trying to inject a logger into my MainWindowViewModel.
/// <summary>
/// Entry point for application.
/// </summary>
/// <param name="e"></param>
protected override async void OnStartup(StartupEventArgs e)
{
await...
I am sorry it took so long to reply.
When you define a data type for a DataTemplate, that tells the program to "show this" when ever you encounter a CustomerViewModel. When I do that, I have my DataTemplate defined like this.
<DataTemplate DataType="{x:Type vm:InstrumentViewModel}">...
If you don't mind it being several days late, here are some suggestions. First; in your xaml, you don't need to name anything unless you are going to refer to it in xaml somewhere down the file. Then you will be referring to ElementName. The bindings take care of the connection between the UI...
Not really. I believe this is a Visual Studio problem. This program runs 24/7 and services sites globally. Since VS forced me to try to upgrade it will not compile. I am down to two main problems. The WebServiceClient is not defined and the namespace ThisProgram.LimsAppService doesn't contain...
I opened a legacy VB program in Visual Studio that I have been maintaining for years. I was hit with a dialog box that said .Net 4.2 was no longer supported and I had to upgrade to 4.7. No way to just say no or postpone. Either accept or exit. I had to work on it so I accepted. After clearing...
Never mind. There was also an error at line 318 of the resources file. There was an errant /> laying there. ???? Don't know where it even came from. Once I deleted it, all the other errors went away including the error I wrote about. The project built, I got an exception because the object type...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.