Category "wpf"

Multi linear brush in same fill rect only in xaml

Can i use lineargradientbrush to fill a rect in xaml only combining different direction? I'd like to have it in a drawingimage... ex image below

FFmpeg library in WPF

I am building a softwere that can decode and encode using Wpf and c#, and I want to do that using, FFmpeg libary. I saw the ffmpeg autogen warpper but I couldn'

WPF airspace issue and WinForms IDesignHost

I'm trying to migrate portions of an app to WPF. One of the near-impossible parts is an IDesignerHost (i.e., a Windows Forms Designer). So for that, I want to u

Using DrawingImage as Button Content in WPF

I want to use a DrawingImage, created from an svg, as content for a WPF Button control. If I set the DrawingImage to Button.Content it only shows the name of th

How to support light and dark mode title bar in wpf c#?

So, I'm trying to customize my wpf app a bit, but thought I would be better to leave the title bar as it is and not do a custom title bar. Problem is, the title

Sharing a window in Teams with a custom WindowChrome flashes the original window chrome

I have a WPF desktop application with a window with a custom chrome. As soon as I set the WindowChrome style-property of the window, I have an issue when sharin

Trouble binding ViewModel to View, as part of a ListViewItem DataTemplate with ReactiveUI

I'm having some issues trying to display a view in a ListViewItem Data template in reactive. I have a ListView in, for example ReceiptView.xaml whose source is

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