Category "wpf"

How do I code a browse file button that lets the user upload their own STL file into a STL viewer?

I am currently trying to integrate an STL File Viewer in my WPF application. I have been using the HelixToolKit to do this and currently can display an STL/OBJ/

Two Identical applications which communicate over a TCP socket connection on the localhost

C#/XAML .NET WPF ... Both applications need to have the ability to connect with each other, and both should have listeners. How would I do this as I know that u

SetVirtualHostName within WebMessageReceived event handler doesn't work

I'm trying to dynamically create an image within a WebView2, using a source passed in from the WebView2's containing application. The source image exists on an

WPF Datagrid seems to keep validation error references even after a new item source

I observed a very strange issue related to WPF DataGrid validation that occurs only in some conditions. To reproduce the issue I have a test window. <Window

Prism 8 , IDialogWindow keynotfound Exception in WPF C#

I used Prism 8.1 and Unity in my WPF Project. I want to implement IDialogWindow but get exception error... Prism.Ioc.ContainerResolutionException: 'An unexpect

combobox tostring() returns object instead of value

I want to retrieve the string value selected in a combo box and convert into an integer, however the SelectedItem method always returns the name of the object.

WPF goes to the top of each pages when navigating/reloading page

I'm very new to WPF .net 5.0 framework. Every time I navigate to a different page in a frame, it maintains the scroll position instead of going back to the top

How to support for Windows 11 "Snap Layout" to the custom maximize/restore button in WPF?

I have a WPF app using a custom Maximize/Restore button. In Windows 11, mouse hover on maximize/restore button does not pop up snap layout feature like below:

Multiple values single data trigger WPF

I have the following piece of code. <Button.Style> <Style BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKe

Using C# Moq testing getting Parameter count mismatch?

I know there are similar questions but somehow I am not able to figure out the situation in my case. I am getting Paramater count mismatch exception. Here is

Editable graphics in WPF

I am developing a WPF application that displays complex graphics to a window. I need these graphics to be highly dynamic, meaning that for instance lines can ap

How to programatically Activate (being Selected) a Document from AvalonDockManager?

I've created a DockingManager from AvalonDock content in my project and my request is quite simple: when I add a document to my LayoutDocumentPaneGroup I want i

Adding Inlines to TextBox is very slow

In my application i have a console-like-control that displays infromation I send from various functions using: Run run = new Run("FancyText"); run.FontSize = 15

In my WPF control, can I hide the validation control based on the size of the adorned element's row?

I have a user control with many sub controls within a grid. Since there are many controls per row, I'm controlling the visibility of the controls by setting the

DataGrid SelectionChanged event firing when scrolling

I am trying to implement a behavior to allow my DataGrid to move to a newly added row at the bottom of the DataGrid. I have buttons that add/remove items from

ObservableCollection / Queue

I am making a file transfer program. The user can add as many file transfers (both download/upload), and those will go in FIFO order. The first choice would be

DispatcherHelper in Windows Community Toolkit

I am working on upgrading MVVMLight to Windows Community Toolkit and facing issues with DispatcherHelper. I am unable to find any examples which can show me how

Best way to determine if a user can view a window

How can I determine if a user can see a window (fully or partially) at the screen using WPF/C#? I tried to define this using WindowState, but the window may be

Cannot find governing FrameworkElement, Yet it works like intended (WPF)

I have a binding that gives me an error, yet everything works exactly like it should. I have a Custom Control with it's style/template in "Generic.xaml", in the

Make RichTextBox automatically scroll to bottom when content is added

I have a WPF UserControl with a BindableRichTextBox: xmlns:controls="clr-namespace:SysadminsLV.WPF.OfficeTheme.Controls;assembly=Wpf.OfficeTheme" . . . <cont