C# WPF Access from ViewModel to MainWindow
Hello, I have this. public class ViewModel : INotifyPropertyChanged { The goal is to get access from ViewModel to MainWindow. So I can change the color and so one. public partial class MainWindow : Window { public MainWindow() …
How I can call a Init() function from my ViewModel?
Hello, How I can call a Init() function from my ViewModel? <Grid DataContext="{StaticResource vm}"> What is different with StaticResource and without? I need without static, then the list works not. public partial…
How I can insert the Window Close Event in my ViewModel?
Hello, How I can insert the Close Event in my ViewModel? How I can access for all classes for my own Logger? public partial class MainWindow : Window { //public Logger Log; public MainWindow() { …
Convert Wpf form to Pdf report
Dear Sirs: We have a WPF application which display a complex form for a medical data record. User can also click a button to convert the form into the Pdf format for further reading. The current implementation is a two steps conversion which is to to…
C# WPF ViewModel change background color for textbox
<TextBox Name="txtSlot" Text="{Binding Path=GebindeSlot, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Height="33" Margin="22,376,183,232" Grid.Column="3" /> Hello, How can I…
How to customize the appearance of TextBox to underline?
How to customize the appearance of TextBox to underline?
Own ViewModel - Threads - Dispatcher
Hello, I use my own ViewModel with properties that display the data via binding. If the properties are set by a thread (Socket Client). Can this lead to problems? Would I have to use Dispatchers, if so, how do I do it correctly? Thanks for response. …
Adorner in textbox
I have created an adornerlayer over wpf textbox. This code block will return the bounds of the text in textbox, i have written this block in onrender method of a adorner class. Rect startPosition =…
binding for the text control - WPF - C#
Hello, How I can make a binding for the text control? I use as DataContext ViewModel. public class ViewModel : INotifyPropertyChanged { private CollectionViewSource cvs1 = new CollectionViewSource(); private…
WPF Window fliker issue
Dear friends, Please let us know how to resolve. WPF Window fliker issue , when switch one window to another Window with C# code. Thanks Asif
How to print PDF with WPF ?
I don't find WPF example. Who can help me? Thanks
how to application control gpio hardware by the gpio driver (WDF like windows sample)
how to application open gpio driver (WDF like windows sample) for control hardware gpio? thanks!!!
SeriLog WPF
Hi, why ist the date not written? Why green wavy line? I need a logger for whole application, global Logger. Did I make it correct? How I can start the console logger? How I can start the console logger only in DEBUG mode? …
How to set the mask for 64 core 128 thread CPU( about Process.ProcessorAffinity )
Source https://learn.microsoft.com/zh-cn/dotnet/api/system.diagnostics.process.processoraffinity?view=netframework-4.7.2#System_Diagnostics_Process_ProcessorAffinity Could you help me ?How to set the mask for 64 core 128 thread CPU( about…
WPF Application master detail
Hello together, I want to add a order number, then add a material number with quantity. Master, Detail with C# OrderNumber = ……… Fill the list OrderNumbers On right site I need a MaterialList Input: Material = …….. Quantity = …… …
Understanding SignedXml.LoadXml (system.Security.Cryptography.Xml)
Hi, I'm using digital signature as a subscription License on my program and am trying to read a part of the XML file to check if my program will work or not. I dug around MSDN and found this for an explanation:…
Unknown Publisher in Set Up project in WPF
I am using Microsoft Visual Studio Installer Projects to create a set up project for my WPF application using .NetCore in Visual Studio 2019. How can I change the publisher from unknown to known when installing the application?
WPF Problem Resources Generator
Severity Code Description Project File Line Suppression State Error The "ResourcesGenerator" task failed unexpectedly. System.ArgumentException: Illegal characters in path. at…
How to Fix WPF Resources Generator PRoblem
Severity Code Description Project File Line Suppression State Error The "ResourcesGenerator" task failed unexpectedly. System.ArgumentException: Illegal characters in path. at…
WPF Button textblock
I need to create two textblocks in the button control, but, I can't. Who can teach me? I need c# code. Thanks! My code: Button btn_Click = new Button(); btn_Click.Name = "Btn_1"; btn_Click.Height = 100;