load a specified user control and its code behind on demand
Hi Peter + Daisy, As far as I can understand, the code behind of a specified user control would fail the following code: (UserControl)XamlReader.Load(new FileStream(_userControlFilePath, FileMode.Open)); Is there a way to load a specified user…
How to bind SelectedItems.Count and Items.Count of ListBox in ViewModel's property?
In xaml this works: <TextBlock HorizontalAlignment="Right"> <Run Text="{Binding ElementName=lb, Path=SelectedItems.Count, Mode=OneWay}"/> <Run Text="/"/> <Run Text="{Binding…
button.ActualHeight with IEnumerable<T> FindVisualChildren<T>(DependencyObject depObj)
I have the code bellow in Wpf C#. It works but problem is the first bt.ActualHeight.ToString() in message is always "0: All other values are right. Can you help me pleas public static IEnumerable<T>…
Visual Studio: Handling renaming of items with design view
Greetings, Let's say that we are creating a form in design view in Visual Studio. We place a button on the form and then double-click the button to automatically generate an event handler for the click of the button. This takes us directly to the code…
How do you access the Windows 10 SystemIndex in a .Net Core app since OleDb is unsupported?
I have a .Net Framework app that I am porting to .Net Core 3.1. It queries the system index to find relevant files using AQS and OleDb. But how do I get the same functionality in .Net Core 3.1 since Ole Db is not supported? (Btw, the keyword system…
What cause this DataTable.ImportRow()'s failure?
for (int i = 0; i < P5.Rows.Count; i++) { var dr = P5.Rows[i]; (※※※※) if ((bool)dr[0]) { dt.ImportRow(dr); } } I paused the program at line(※※※※), then…
How to enable Thumbnail LivePreview to be live for when window is minimized?
If you put continuous animation at window (WPF Framework), then you minimize window, then go at Taskbar application button to view its LivePreview, animation at the preview is paused. How to enable Thumbnail LivePreview to be live for when window is…
In WPF apps, should the implementation of INotifyPropertyChanged only be in the ViewModel?
I'm assisting in writing a WPF app. One thing I've done only in the ViewModel (VM) to date, is define properties associated with the data from the model, so that I can use MVVM Light's RaisePropertyChanged() method in the setter of the property. That's…
What is the best solution for draw lines in Viewport3D in WPF
Hi I'm trying to make a 3D Chart of a surface with the Viewport3D class and it must be able to be moved with mouse. My problem is how to make the lines for the grid of chart. I need that the lines have a behaviour like 2D moving in a 3D space. I dont…
Is it possible to load user controls on demand? - Cont.
Hi Peter + Daisy, Is it possible to load a specified user control (i.e. UC1, UC2,... UC# ) without building any list, just as we do with a specified page? For example, NavigationService NS = fm.NavigationService; NS.Navigate(new…
Convert MemoryStream to BitmapImage thrown “System.NullReferenceException”
I am trying to use TagLib to load album art dynamically to Image in WPF. So ,I define a dependency property like this: public static readonly DependencyProperty AlbumImageProperty = DependencyProperty.Register( "AlbumImage",…
How to access the internal filtered collection of ICollectionView?
I've these collection and collectionviews: public ICollectionView Tenants { get; set; } public ICollectionView Plots { get; set; } List<int> foundPlots and these subscription and filters: Tenants.CurrentChanged +=…
Wpf C# get ActualHeight of the button added by program
I have a code bellow. I want to get heights from all buttons adding programmatically, but results for all heights is 0. Can you help me please? int k = 1; int indexMax = 100; Double[] vyska = new double[1000]; private void btnOpen_Click(object…
Chart Update after created and linked datasource
Hallo I'm trying to find a way to update the chart after the a list of Objects was binded with the chart. (Simple explanation below). Chart is created once the form is loaded, and got a tick event that should update the data every couple of…
How to bind Group Names and Items separately in different Comboboxes
I've an ICollectionView named MyObjects with group description. In code I can access group Name and Items this way: foreach (var gr in MyObjects.Groups) { var group = gr as CollectionViewGroup; var name = group.Name; var item =…
'Navigate' is not a member of 'WebView22' ?
Hello & Thanks ; Trying to convert my SafeBrowser WebBrowser1 to WebView22 & getting error: 1>C:\Users\vmars\source\repos\WindowsApp2_01\Form1.vb(7,9): error BC30456: 'Navigate' is not a member of 'SafeBrowser'. Which brings up the…
receive email on Wpf application C#
hi im wondering if anyone has any idea how to receive emails in my application. I have been looking for some help on what the front end is for my users but also the code behind it any help would be great
Win 10 VS C# Empty Toolbox ?
Hello & Thanks ; Starting my 1st C# project , CefBrowser , But cant get populated Toolbox to appear . How can I fix this ? Thanks for your Help...
Error Message while trying to print a shipping label from USPS
I am getting the message below after attempting to print a simple shipping label from the USPS site. I have done this 1000 times in the past, but this error is after a forced upgrade? Please advise..... This XML file does not appear to have any style…
Print not working in latest Windows 10 version from winforms using Forms.WebBrowser control
From Click once applet the Print feature is not passing on the documents (PDF) to the printer queue. There is no error, it just does not do anything. Whereas we can print PDF's outside of the applet. The applet uses System.Windows.Forms WebBrowser class…