WPF DataGrid: Dynamically-Generated ContextMenu for Individual Rows.
Hi. I have a WPF DataGrid that displays a bunch of rows. Each row has a right-click ContextMenu with its own commands. I'm not able to get the ContextMenu part right. It's complaining that "ContextMenu cannot have a logical or visual parent."…
Grouping DataGrid based on two Entity Framework tables
Hi All. The Form1 has DataGrid populated from EF table Table1. From Form1 I call Form2 that also has DataGrid with multiple selected items and populated from EF Table2 which is related to Table1. When I selected items in Form2 and click save button…
[UWP to WPF][C#] How to know whether bluetooth is on or off?
I want to know whether bluetooth is on or off in Windows 10. I found microsoft.sdk.contract package in nuget to use Windows 10 API including bluetooth-related methods. I tried to get 'Radio' instance using 'GetRadioAsync()' but it always throws…
Create an Usercontrol
Hi I want an usercontrol like fontdialog, printdialog,notifyicon. That the user can set properties but not anything on design time form. Thanks
How to assign a hex color?
Hi Peter + Daisy, How to replace "Orange" with "#FFBF72FF" on line 5? Thanks. namespace WpfApp2.general_pages { class Pages_ViewModel : ICommand, INotifyPropertyChanged { public Color Tb3BackgroundColor { get; set; }…
missing Arc control in VS2019 Blend
I can't find Arc in assets. Visual Studio 2017 have it but 2019 not? How to bring Arc in to VS2019?
Migrate windows form to MVVM pattern
Hi Team, using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Matrix { public…
The forms are cut for me using high resolution on WinForm
I got a new laptop with very high resolution. I increased the size text, apps and other to 150% i work on WinForm program using Visual-Studio 2019. All the forms in my program are cut and everything goes wrong on the screen. i try this: …
how create popup info to dispaly related data
Hi All. I have DataGrid that has context menu to call other form for add related data to selected item. Now I would like to create popup DataGrid in mouseover event on selected DataGrid item to display data that related to it. That gives information…
Capturing selection change / click inside WPF ListView / MVVM
Hi, I am trying to get the selection change inside a WPF ListView using Interaction.Triggers. I have only included just the basic XAML for now. But I am getting error in XAML as well as in code. XAML : The name interaction does not exist in namepace…
C# How to find out if a form is running
Hi, folks. I have a form application in C# (I use Visual Studio) that has two items in a menu. Both of them show the same form, but with different data. They access different tables in the database. If the user clicks in one of the menu items, the form…
Putting a space in a WPF application name
I have created a WPF project named "MyApplication" because if you put a space it creates a weird namespace. However, I want my executable to be "My Application". Where can I make this happen and will changing it from…
How do I make validation rules work with two controls, Part 2 of 2
(Part 1 is here: https://learn.microsoft.com/en-us/answers/questions/94723/how-do-i-make-validation-rules-work-with-two-contr.html) I'm not sure this will help, but here's the code to the validation rule class I've defined: using System; using…
Winform Project and remote debugging
I have a winform project which i publish a centralize folder and user install application from that folder. so when i update any functionality and give publish then user gets update when they run their application. Please tell me how could i connect my…
How do I make validation rules work with two controls, Part 1 of 2
I've got a textbox that's within a border. The idea I'm trying to do is validate that the data entered by the user. I've done this with other controls (a DatePicker control and another textbox) but in those cases it wasn't validation, it was other things…
WPF Checkbox Control change size
Hello, I want to change checkbox size. who can help me? thanks XAML: <CheckBox x:Name="CheckAllBtn" Content="ALL" Canvas.Left="13" Canvas.Top="182" FontSize="36" Width="109"/>
WPF C# Desktop App - Build date from the application
Hello, private void MainWindow_Loaded(object sender, RoutedEventArgs e) { CurrentViewModel = (ViewModel)(this.Resources["vm"]); CurrentViewModel.InitFromMainWindow(); this.Title = "Setting…
C# Version - increase the last number
Hello, How can I have the compile number counted up and output at each compile? Like this V1.0.0.000001 Next Like this V1.0.0.000002 Next Like this V1.0.0.000003
Hosting WCF service in a mixed Iaas and Saas scenario
Hello, I currently have a WCF backend in a Windows service exposed via net.pipe for an ASP.NET web application, on premise. I would like to move to Azure. is it possible to install the WCF service on one or more servers (Iaas), expose the WCF services…
How to group procedures and reuse - ViewModel
Hi Peter, How to group procedures on line 4, 5 and 6 into one method and reuse it at its original place (line 4, or 5 or 6 ) and on line 26. Thanks class Pages_ViewModel : ICommand, INotifyPropertyChanged { public Color Tb3BackgroundColor {…