Category "wpf"

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

Custom Tooltip on LineChart (lvChart)

I closely follow step-by-step lvChart Customizing Tooltips in trying to build a custom tooltip for LineChart points. But I get empty tooltip content. Other than

I want to change color of mark on axis in WPF chart

I tried to change color of marks on axis (small lines near numbers), but it didn't change them, instead they just disappear. Here is what I've tried: <DVC:Ch

WPF - Problem showing a symbol from a custom font

I have a custom font. The font contains symbols at specific addresses. I want to display one of the symbols in a TextBlock. The font (ttf-file) is located in my

How can I integrate toast notifications in WPF app?

I wanted to add toast notifications to my wpf app. I've followed the Send a local toast notification from desktop C# apps from Microsoft, but I'm stuck on the s

C# Windows Messages in Console Application?

I need to use IPC to receive messages from another process. Currently I am using WPF application to receive messages using WindowsMessages but I am wondering if

Add/Delete Item in real-time from ListView (C# MVVM WPF)

I have a ListView with an ObservableCollection. The class User has a List with Groups. I have another ListView which shows the Groups of the selected User. Now